Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Redirecting non-www to www

Search engines think of http://yourweb.com and http://www.yourweb.com as completely different domains, meaning that you are potentially splitting the value of your website content by keeping them separate. Fortunately there’s an easy fix by using a 301 Redirect.

What is a 301 redirect?

Put simply, a 301 redirect tells a search engine that one page has been permanently moved to another location. A 301 can be used in a variety of cases but this example will point all non-www traffic to www.

Creating the 301 redirect

1. Ensure that your server has the Apache Rewrite Module activated (If you’re unsure, contact your web hosting provider).

2. FTP into your site, download the .htaccess file from the root folder of your site, and make a backup (just in case things go wrong!)

3. Add the code below to the .htaccess file, save it, and upload to your site (remember to change yourweb.com to whatever your site is):

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^yourweb.com [nc]
rewriterule ^(.*)$ http://www.yourweb.com/$1 [r=301,nc]

4. Lauch your web browser and go to http://yourweb.com. If you’re redirected to http://www.yourweb.com/ everything’s fine. Check your site over to make sure that no pages are broken and that’s it – done.

If there’s anything broken or your site won’t load, restore the .htaccess file that you backed up earlier and upload it to your site. There’s plenty that could go wrong so if you’re unsure I’d definitely advise getting in touch with your hosting provider to see if they’ll help.



This post first appeared on SEO Consultant - SEO Services | Matt Beswick, please read the originial post: here

Share the post

Redirecting non-www to www

×

Subscribe to Seo Consultant - Seo Services | Matt Beswick

Get updates delivered right to your inbox!

Thank you for your subscription

×