Forum Moderators: phranque
They are both pointing to the same IP address. Need to redirect the .com to the .co.uk.
Have read that creating a .htccess file in my root and having it contain the following will sort this out:
Redirect 301 / http*//www.yourdomaintoforwardtohere.co.uk/
My concern is that they are hosted from the same IP address and share the same files. Will this still work? Advice greatly appreciated.
3 more details:
1. Does 301 work on a windows server?
2. Will a 301 merge/add the full PR and backlinks over?
3. Is 301 the best option here? Have heard of a 302. Plus, how about asking the DNS holder to sort it out from their side somehow?
A huge thanks to anyone who is in the know about this
Calum
Both of them can have the same IP.
All of my sites are set up that way, and I don't seem to have any problems.
I use one vhost for domain.com and one for www.domain.com - and any request coming to the domain.com host, just redirects to the same file on www.domain.com.
It does not make a different if you use 301 or 302. I think search engines stopped caring about it some time ago, but if you have a choice then use 301.
Afraid I'm not as up on how to turn one of my domains into a virtual host. Please advise. So far I've created the .htccess in the site root - so that may cause a loop...it's killed almost all the backlinks into the .com (in just 36 hours).
Is this done from my DNS host? Am desperate to remedy - hope I haven't really screwed things up permanently with the .htccess
Thanks from a desperate
Calum
The usual way to do this in .htaccess is to use mod_rewrite in your web root directory:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} !^desired_domain\.com
RewriteRule (.*) http://desired_domain.com/$1 [R=301,L]
Jim