How a simple & easy 301 redirect can maximise your SEO

In order to maximise your search engine optimisation you have to make sure that the search engines are treating the www and non www versions of your website in the same way. For example yoursite.com and www.yoursite.com would be treated as two different sites by the search engines unless you tell them that they are the same. The implication of this is that you may not get all the credit for your inbound links as they may be split across the www and non www versions of your website.

If you add the following code into your websites .htaccess file it will tell the search engines that you want to treat the www and non www versions of your website as the same site. All you will need to do is change the link to the your site as necessary and then you will have set up what is known as a 301 redirect, thus maximising your search engine optimisation.

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.yoursite.com$ [NC]
RewriteRule .? http://www.yoursite.com%{REQUEST_URI} [R=301,L]

The .htaccess file can be found in the root folder of your website. Please note that this file may be hidden so you may need to set ‘show hidden files’ within your FTP client in order for it to be visible.

Matt Peacock

Matt is an award-winning WordPress developer with over 11 years of web development experience. A WordPress devotee with a real passion for contributing and improving what he does on a daily basis, he builds websites that are the 'difference that makes the difference'. Matt is a former county champion golfer, NLP Practitioner, qualified life coach and has a degree in Psychology.

Share
Published by
Matt Peacock

Recent Posts

Why collaborative partnerships are the way to grow your agency

How do you go about growing your agency? Do you rely on repeat business and…

4 years ago

Didn’t get that promotion? Good

Following on from yesterday's post “if you want to be tougher, be tougher”, this is…

4 years ago

Why WordPress coding standards are everything

We were recently asked by someone why we relatively expensive and charged more than someone else…

6 years ago

Our first e-book is here, here is how you can get it

We are pleased to announce that our first e-book is now available to download on…

6 years ago

Weekly round-up of WordPress news – Vol 21

A nice mix this week of Wordpress guides and e-commerce posts make up this weeks…

7 years ago

Weekly round-up of WordPress news – Vol 20

GDPR features today and this is going to be a hot topic in WordPress and…

7 years ago

This website uses cookies.