PDA

View Full Version : domain forwardings



rob
25th Oct 2008, 12:34 pm
I bought the .co.uk version of my domain name but have been using the .com however I would now like to set up so when someone types .co.uk it forwards to the .com

Do I need to speak to Clook about this or Namesco who have the domain names parked?

David
26th Oct 2008, 03:30 pm
First make sure that the nameserver for the .co.uk domain is pointing at Clook. Then in cPanel, you can park the domain on top of the .com. You should then be able to see the site using either domain. Once that is working, add a 301 redirect using cPanel or .htaccess to redirect all requests. You should also do this for variants of the address with or without the "www" to avoid cannonical problems. Here's an extract from the .htaccess for CADTutor:



RewriteEngine On

RewriteCond %{HTTP_HOST} ^cadtutor.net$ [NC]
RewriteRule ^(.*)$ http://www.cadtutor.net/$1 [R=301,L]

RewriteCond %{HTTP_HOST} ^cadtutor.co.uk$ [NC]
RewriteRule ^(.*)$ http://www.cadtutor.net/$1 [R=301,L]


The result of the above is that if a user types or follows a link for any of the following:
http://www.cadtutor.net
http://cadtutor.net
http://www.cadtutor.co.uk
http://cadtutor.co.uk

they will be redirected to http://www.cadtutor.net and because it is a 301 redirect, search engines will know that this is a permanent state and give credit for all 4 link types to your one website.