View Full Version : How to make a 301 redirect?
narendra.s.v
11-07-2008, 08:30 AM
This is a message i got in analytics, does anyone know how to make a 301 redirect? :rolleyes:
Search engines may think techtreak.com and www.techtreak.com are two different sites.You should set up a permanent redirect (technically called a "301 redirect") between these sites. Once you do that, you will get full search engine credit for your work on these sites.
For example, techtreak.com seems to have 33,396 inbound links whereas www.techtreak.com has 26,263 inbound links. By correctly configuring a permanent 301 redirect, the search rankings might improve as all inbound links are correctly counted for the website.
sarahG
11-07-2008, 09:50 AM
You don't say which version you want as your main domain so I've assumed the non www version as that has more links.
First, open up .htaccess if it exists, check if the next 2 lines are in it already, as it will be if you use WP permalinks. If they are then ignore these lines, if not, put them at the top of the file.
RewriteEngine On
RewriteBase /
Then below this somewhere, ideally right below, add in
RewriteCond %{HTTP_HOST} !^techtreak\.com
RewriteRule (.*) http://techtreak.com/$1 [R=301,L]
You can also log into your Google Webmaster Tools account, select the domain and you have an option to set the preferred domain and you can set it in there too, but do the above as well.
athlon24
11-07-2008, 10:40 AM
You can also log into your Google Webmaster Tools account, select the domain and you have an option to set the preferred domain and you can set it in there too, but do the above as well.
I also got that message before in my site, and what I did is, I just set options in Google Webmaster Tools and I didn't do anything else and the alert was gone already. Are there any significant effect if we did not set it up in .htaccess?
navjotjsingh
11-07-2008, 11:04 AM
Yes it does have a signifant effect on your rankings. Even your page rank gets affected since Google considers both www and nonwww versions as entirely different websites. Choosing any one format and sticking to it maintains consistency in every type of ranking.
Kevin
11-07-2008, 11:31 AM
you can also use
Redirect 301 /oldpage.html http://www.yoursite.com/newdirectory/newpage.html
or even redirect a whole site to a new domain using
Redirect 301 / http://www.newsite.com
athlon24
11-10-2008, 01:59 AM
Yes it does have a signifant effect on your rankings. Even your page rank gets affected since Google considers both www and nonwww versions as entirely different websites. Choosing any one format and sticking to it maintains consistency in every type of ranking.
hmmm, what I mean is, if you already set the option in Google webmaster tools, do you still need to set it up in your .htacess as sarahG suggested? If you did not do both, are there any significant effect on your site?
sarahG
11-10-2008, 08:00 AM
hmmm, what I mean is, if you already set the option in Google webmaster tools, do you still need to set it up in your .htacess as sarahG suggested? If you did not do both, are there any significant effect on your site?
Yes you should if you can. Google isn't the only search engine for a start, so just because you've told Google there others that don't know. Secondly the preferred domain is you just saying 'I'd prefer you to use this domain' but even Google (as far as I'm aware) says to still control it yourself if you can. Also, Google is simply saying 'this is your preferred domain', but I don't know if it passes the power of backlinks to say your non-www version through to your www version, so if you had 100 to each, although Google may show your www version, it may still consider that it only has 100 backlinks and not 200.
At the end of the day, if you can do it, just do it. It's only a few lines of code.
vBulletin® v3.8.3, Copyright ©2000-2012, Jelsoft Enterprises Ltd.