Forum Moderators: phranque

Message Too Old, No Replies

Multiple 301's

         

dougie

9:30 am on Sep 11, 2004 (gmt 0)

10+ Year Member



Getting a little stuck on this and I have searched around here, but can't seem to find the answer, apologies if it is here somewhere.

I've learnt from some of the excellent members here on how to do the actual code for a 301, but if you've got 7 domain names and all 7 have very similar names, (all 7 were purchased in case someone got the spelling wrong). Theres only 1 website and you want all of the other 6 to 301 to the website, where would you upload the .htaccess to please?

Any help very much appreciated.

Dougie.

fish_eye

12:30 pm on Sep 11, 2004 (gmt 0)

10+ Year Member



1) Do you mean you want widgits.com/somewhere to be rewritten as widgets.com/somewhere?

2) Do you want to tell a robot that has already found widgits.com to stop looking for widgits.com and now look for widgets.com forever more?

...and it depends on how the names get resolved... If all domains come in on a common public_html then you'd put all the commands in one .htaccess and that would be at the highest level (and in fact it may be only one command).

dougie

12:53 pm on Sep 11, 2004 (gmt 0)

10+ Year Member



1) Do you mean you want widgits.com/somewhere to be rewritten as widgets.com/somewhere?

Yep.

2) Do you want to tell a robot that has already found widgits.com to stop looking for widgits.com and now look for widgets.com forever more?

Yep.

...and it depends on how the names get resolved... If all domains come in on a common public_html then you'd put all the commands in one .htaccess and that would be at the highest level (and in fact it may be only one command).

What I mean is that say for example the 6 other domain names have been, in the past, on Google, Yahoo etc, and they should all now point to just the main domain, but suppose the main domain name is widgets.com, where do I publish the .htaccess to?

jdMorgan

2:57 pm on Sep 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What I mean is that say for example the 6 other domain names have been, in the past, on Google, Yahoo etc, and they should all now point to just the main domain, but suppose the main domain name is widgets.com, where do I publish the .htaccess to?

You'll have to find out the answer to the implied question in fish_eye's comment:

...and it depends on how the names get resolved... If all domains come in on a common public_html then you'd put all the commands in one .htaccess and that would be at the highest level (and in fact it may be only one command).

Where do these alternate domains resolve to? That is, if you request the "home page" of each domain, what server, what directory, and what file does the server return?

If the server always returns /user/public_html/index.html from a single hosting account, then you'd put the redirects into that same directory in that account. If each domain is hosted separately, then you'll have to have multiple .htaccess files, one each in the home directory of each hosted account.

Or possibly, you have some of those alternate domains set up to use a subdirectory of your main account's filespace. In that case, you might want to remove the configuration code that steers those alternate domains to subdirectories, and point them all at the main account's home directory. Then, you could use a single .htaccess to redirect them.

So it all depends on where the alternate domains currently resolve, as fish_eye stated.

Jim