Htaccess for addon domains

Written by Ashley on April 13, 2008 – 4:30 pm -

For those of you that make use of add-on domains on your hosting accoumt, its important to setup an .htaccess file to redirect any visitors or bots who find their way to one of the subdomains., to aviod duplicate content issues.

There are three (well six actually!) ways of accessing an add-on domain:

Root domain name (ie. www.addondomain.co.uk)

Subdomain (ie. www.addondomain.the-hosting-domain.co.uk)

Subfolder (ie. www.the-hosting-domain.co.uk/addondomain)

Then of course you have the same three again without the www.

So in order to avoid duplicate sites being spidered and indexed, we can use a few command in the .htaccess file so that all possible names resolve at www.addondomain.co.uk.

Here is what you need to put in you htaccess file in the directory that houses your add-on domain ie. www.the-hosting-domain.co.uk/add-on/ :
Code:
Options +FollowSymlinks
RewriteEngine OnRewriteCond %{HTTP_HOST} ^addondomain\.co.uk [NC]
RewriteRule ^(.*) http://www.addondomain.co.uk/$1 [R=301,L]

RewriteCond %{HTTP_HOST} ^www.addondomain.the-hosting-domain\.co.uk
RewriteRule ^(.*)$ http://www.addondomain.co.uk/$1 [R=permanent,L]

RewriteCond %{HTTP_HOST} ^addondomain.the-hosting-domain\.co.uk
RewriteRule ^(.*)$ http://www.addondomain.co.uk/$1 [R=permanent,L]

And add this to the .htaccess file in the root domain: ie. www.thehostingdomain.co.uk
Code:
Options +FollowSymlinks
RewriteEngine OnRedirect /addondomain http://www.addondomain.co.uk

That should work! :-)

Please note in my example:

addondomain = Rootdomain name
the-hosting-domain = The domain name that hosts your add-on domain.

Feel free to ask any questions.


Posted in SEO | 1 Comment »

Avoiding Canonicalisation of your URL

Written by Ashley on April 13, 2008 – 4:12 pm -

Many hundreds and thousands of websites are potentially damaging their ranking abilities by failing to avoid canonicalisation of their websites url.

Canonicalisation occurs when a website is able to be accessed via both www.website.com and website.com, in severe cases this can cause the search engines to effectively index 2 identical copies of your site, and then whilst its unlikely your website will attract any duplicate content penalties, its simply not good practice, effectively you are forcing the search engines to choose which page is most relevant, and often they may choose the wrong URL.

Here are a couple of examples of websites:

http://bbc.co.uk - Note the BBC url, correctly redirects you to www.bbc.co.uk

http://dailyecho.co.uk / www.dailyecho.co.uk - The Daily Echo on the other hand have both urls accessible and indexed by the search engine.

The best way to avoid any Canoicalisation issues is to setup a .htaccess file in the root folder of your domain that uses a 301 redirect to redirect to only one URL for your website.

You can choose to either direct the URL to www. or just plain http://, my preferred option is always www., but thats a personal choice and will not affect your SEO in anyway.

To setup an .htaccess file to avoid any such duplication issues, simply open your preferred text browser and insert the following code into the doucment and then save the file, calling it ‘.htaccess’, then upload the file to your sites root folder.

Options +FollowSymlinks
RewriteEngine On

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

Once you have done this, you can test that it is working correctly by visiting your url without using www., you should then be automatically redirected to the www. version of your website.

Another, softer way of fixing this issue, is using a function within Google’s Webmaster Tools section, within this handy utility is a section for you to tell Google which URL you would prefer them to index.

Of course, using this method does not fix the problem with Yahoo, MSN, Ask and all the other (non-Google powered) search engines.


Posted in SEO | No Comments »

301 Redirects - moving a web page

Written by Ashley on April 13, 2008 – 4:10 pm -

If you are moving content between page or domains on a permanent basis to maintain a seamless transition between your pages (hopefully) established rankings, there really is only one way of redirecting your existing urls.

Using a 301 redirect.

There are a number of ways of implementing a 301 redirect, my preferred method would be a command in the .htaccess file, but alternative ways are equally acceptable.

For a full low down on setting up and implementing a 301 redirect, this site has some great information.

http://www.webconfs.com/how-to-redirect-a-webpage.php


Posted in SEO | No Comments »

Get your site indexed within 24 hours

Written by Ashley on April 13, 2008 – 4:04 pm -

Want to get your site indexed and listed within google within 24 hours?

Ever heard of Gumtree.com? Submitting adverts for your site to Gumtree is an excellent way of getting your site indexed in Google and can even bring you some visitors too!

Simply navigate to Gumtree.com, i often choose my local area but any Gumtree area will do.

I post a brief intro to the service or subject the site discusses and then place a non-anchor text link, ie: http://www.quickwhois.co.uk

9 times out of ten your site will be indexed, listed and ranking in Google within 24 hours.


Posted in SEO | No Comments »

Free Ranking Checker Tool

Written by Ashley on March 31, 2008 – 5:36 pm -

I noticed that Aaron Wall from Seobook.com has released a fantastic free ranking checker tool, and unlike some tools on the market its free and even better for us UK users, unlike many similar tools (with a quick fiddle with the settings) its compatible with google.co.uk. Read more »


Posted in SEO | 1 Comment »
RSS

  • Recommended Partners




  • Links