If I have been promoting my site like mad, and people are finally starting to link to me voluntarily without my supplying the link information, I may have inbound links that use different URLs, such as the following: http://www.PetStyles.com and http://PetStyles.com.
The problem with this is that some search engines view these URLs as representing different sites, so I may not be getting full credit for all of my hard earned links.
If I use a permanent, or ‘301’ re-direct on the second version of the URL (without the ‘www’), I can funnel all my traffic through the first URL, and all the links will be counted. This naturally increases my site’s chances of a higher ranking.
I need to tell my hosting server to redirect the traffic in such a way that the consumer doesn’t experience a delay in reaching my site. There are two main types of servers, and I can complete the procedure myself if I am hosted on an Apache server.
301 Redirect on an Apache Server
The Apache Rewrite Module will need to be on for the following instructions to work. Many times the module is on already, or the hosting provider will be happy to enable it for me; otherwise I can enable it myself as follows:
First, I open the httpd.conf file, back it up in case of error, and find this line:
LoadModule rewrite_module modules/mod_rewrite.so
I uncomment the line, save the file, and restart the server. Now I am ready to install the ‘non-www’ 301 redirect.
I have to download the .htaccess file from my root web folder to folder where I can edit it, but I make a copy of the file and save it intact, without editing, in case I need to revert to it later for some reason.
Now I can open the original .htaccess I downloaded in my Notepad.
I add the following code into the .htaccess file. I am of course using ‘PetStyles’ – you would use your own website information. Be sure not to touch anything else!
RewriteEngine On
RewriteCond %(HTTP_HOST)^PetStyles.com
RewriteRule(.*)http://www.PetStyles.com/$1[R=301,L]
Now I have to upload the file back to the EXACT same place I downloaded it from.
Once the upload is completed. I can open a browser, and try visiting the ‘non-www’ version of my website address. If I have completed the procedure properly, I will be immediately redirected to the ‘www’ version, and it will show in my browser’s address bar.
301 Redirect on a Microsoft IIS Server
Microsoft servers don’t have a .htaccess file to alter so your hosting provider will need to make this change for you. If they need more information, refer them to the following:
Use the Internet services manager to create a new IP-based website using the ‘non-www’ URL, or use the host header (virtual website) of the ‘www’ version.
Verify the server headers for each website using a server header checker. The response should be 200 OK for both addresses.
Add the domain-revised version of the following ASP code to the default home page for http://PetStyles.com:
If I want to be sure my redirect is working properly, I can use the server header checker to verify that the 301 redirect is working.
I can visit http://news.stepforth.com/seo-tools/http-header-checker.php
and type in my ‘non-www’ address. The result should read:
#1 Server Response: http://PetStyles.com
HTTP Status Code: HTTP/1.1 301 Moved Permanently
Date: Wed, 14 Mar 2007 22:49:28 GMT
Server: Apache/1.3.27 (Unix) PHP/4.4.1 FrontPage/5.0.2.2510 mod_ssl/2.8.14 OpenSSL/0.9.6b
Location: http://www.PetStyles.com/
Connection: close
Content-Type: text/html; charset=iso-8859-1
Redirect Target: http://www.PetStyles.com/
#2 Server Response: http://www.PetStyles.com/
HTTP Status Code: HTTP/1.1 200 OK
Date: Wed, 14 Mar 2007 22:49:28 GMT
Server: Apache/1.3.27 (Unix) PHP/4.4.1 FrontPage/5.0.2.2510 mod_ssl/2.8.14 OpenSSL/0.9.6b
Connection: close
Content-Type: text/html
It worked! Now all my link juice is being credited to my main site, and I should see a boost in my rankings.
1.The ERA Of VOICE SEARCH Hello, 2020! Long gone are the days when we used to head over to the search engines on our desktops and
Read MoreThe year’s 2019! We have long laid our footsteps in this digital world. Did you know that more than 4 billion people al
Read MoreIntroduction about National SEO Services A National SEO service provider uses search engine optimization practice to enhance the
Read More