Forum Moderators: phranque

Message Too Old, No Replies

How to deal with SEs who are indexing virtual server path?

They are indexing the /~/ path to website instead of domain URL

         

Wizcrafts

4:24 am on Jul 21, 2005 (gmt 0)

10+ Year Member



For some unknown reason Google and MSN have been indexing some pages on my website by their virtual path on the shared hosting server, in addition to indexing the same pages by my domain name(s). The shared path resembles this example:

ht*p://ns.wxyz-server6.net/~my_account_name/requested_page.html

When people search for terms matching the description on the indexed pages they sometimes come looking for an html page on the path exemplified above, instead of www.mydomain.com/desired_page.html. They aren't even aware that there is a Domain name and URL associated with that path, and I want them and the bots to be aware of that. I especially need to stop SE bots from indexing anything based on the server path to my account.

To deal with this SE mistake I have a redirectmatch rule that does this:

RedirectMatch permanent /~my_account_name/ ht*p://www.my_domain.net/

This sends both people and robots to my home page, but they then have to locate their desired destination page from my navigation menu. How can I add a wildcard to the redirectmatch rule so that they all end up directly at the requested_page.html, with my www URL in the addressbar, and still tell the robots that they indexed the wrong path - please use this Domain URL instead?

What else can I add that tells search engines not to index anything based on the virtual sever path, but to use my Domain names instead (like they usually do)?

jdMorgan

4:52 am on Jul 21, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can use a back-reference with RedirectMatch:

RedirectMatch 301 ^/~my_account_name/(.*)$ http://www.my_domain.net/$1

Jim

Wizcrafts

4:54 am on Jul 21, 2005 (gmt 0)

10+ Year Member



Thanks Jim, I knew I was close. Your code works like a charm, except I left off the starting anchor since there is various server path stuff before the /~account_name part.

Wiz