Membership is FREE, giving all registered users unlimited access to every Acorn Domains feature, resource, and tool! Optional membership upgrades unlock exclusive benefits like profile signatures with links, banner placements, appearances in the weekly newsletter, and much more - customized to your membership level!

Redirection

Status
Not open for further replies.
Joined
Jun 29, 2007
Posts
1,902
Reaction score
13
I'm very slow out of the blocks on this one but want to start redirecting my non www. domain to my www. domain (i.e. mywidgets.co.uk to www.mywidgets.co.uk)....

....but what one do you link to the other?

Is it based on what Google shows in your SERP as being the main - or which one sends most visitors to your site from analytics tools - or is there another way of working this out ??
 
If you want to create one url in the serps (addressing any duplicate pages / canonical issues from the non www.) And also ensure the value from any links going to the non www. Go to your sites home page of http://www.mywidgets.co.uk/ you need to create a 301 redirect.

First thing I would do is speak to your host and ask them if the server can handle a 301 redirect via a htaccess file (ensuring the RewriteEngine is switch on etc).

If you site is hosted on a linux server open notepad and create a file called .htaccess the below code should do the trick (replacing the mywidgets.co.uk with your site name).

Code:
Options +FollowSymLinks
RewriteEngine on

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

If not try

Code:
Options +FollowSymLinks
RewriteEngine on
RewriteBase /

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

I would test this on a test site on the same server first
not your main site once the .htaccess file has been added, clear all history in your browser and refresh the page etc.


If you sites files are built in html your might want to also 301 redirect the index.html pages i.e
http://www.mywidgets.co.uk/index.html to http://www.mywidgets.co.uk/

Add the below to the above to 301 redirect all files ending in index.html to /

Code:
RewriteCond %{THE_REQUEST} ^.*/index.html
RewriteRule ^(.*)index.html$ http://www.mywidgets.co.uk/$1 [R=301,L]

You should also do a http header check to ensure it is redirecting probably (and ensure it is a 301 redirect) as you don’t want to block your site if something is a miss, hence testing on a test site on the same server etc.

try

http://www.rexswain.com/httpview.html

or

http://web-sniffer.net/
 
Last edited:
Many thanks for all this - very much appreciated. Will certainly come in useful

Anyone any thoughts on which way round to do the redirection (www to non www or vice versa)?
 
Many thanks for all this - very much appreciated. Will certainly come in useful

Anyone any thoughts on which way round to do the redirection (www to non www or vice versa)?

Are there links pointing to the site? if so to which url non www. or the www. ?

Is the non www. or the www. indexed in google?

Do you have a google webmaster tools account what does that say? have you set what url you want there? Have added a xml site map there with the correct urls?

How does you site link to its pages?
 
Last edited:
I don't have all the answers as of now but I understand from your questions the relevance should be based on incoming links and Google's ranking URL - treat that as main and redirect the other.

I imagined this would be the case but wanted to make sure there was nothing crucial I'd missed

Thanks again mate
 
Status
Not open for further replies.

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Members online

Premium Members

New Threads

Domain Forum Friends

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators
General chit-chat
Help Users
  • No one is chatting at the moment.
      There are no messages in the current room.
      Top Bottom