cancel
Showing results for 
Search instead for 
Did you mean: 

SEO improvement with redirect

FIXED
trugmaker
Dabbler
Posts: 17
Registered: ‎12-10-2012

SEO improvement with redirect

After completely re-vamping my website (using the same www.trugmakers.co.uk), I have slipped from high on page one to half down page two, thus affecting sales BIG time! After using several seo checker sites, several times, one aspect keeps raising it's head! Google regards www. and non www. as two different sites. This is bad! So, am I correct in believing that I :-

1) Create a wordpad document which reads:-

RewriteEngine on
RewriteCond %{HTTP_HOST} ^trugmakers.co.uk [NC]
RewriteRule ^(.*)$ http://www.trugmakers.co.uk/$1 [L,R=301]

 

2) Save as .htaccess  (and should it be .htaccess.txt or without the .txt)

3) Insert this file into my ht.docs directory

4) The above is, as I understand from gleaning the net, the correct method

OR DO YOU KNOW DIFFERENT!

The reason I ask is that I am already in trouble with drop in sales, I do not want to jeopardise accessibility any more.

Thankyou in anticipation.

9 REPLIES 9
Penny
Superuser
Superuser
Posts: 1,313
Thanks: 809
Fixes: 8
Registered: ‎05-04-2007

Re: SEO improvement with redirect


@trugmaker wrote:

After completely re-vamping my website (using the same www.trugmakers.co.uk), I have slipped from high on page one to half down page two, thus affecting sales BIG time! After using several seo checker sites, several times, one aspect keeps raising it's head! Google regards www. and non www. as two different sites. This is bad!


... I don't know anything about the .htaccess factors you mentioned, but the Webmaster tools area on Google - https://www.google.com/webmasters/tools/home? - allows you to register both versions (www and non-www) and say which one you'd prefer be served up.

I'm not yet entirely convinced that being registered at Google is beneficial (hasn't improved visibility for SCOSSE bazaar noticeably, we seem to get more visits via other sources) but if the two-site factor is your primary concern, you might find registering both versions and indicating your preferred one, could help.  No guarantees : )   but might be worth a try.

Penny Rollo * * * joined Force9 on 17/02/98 * * * with PlusNet from 2000 onwards * * * personal website at pennymidasrollo.plus.com
Project HappyChild website (free educational resources for kids and schools, plus directory of charities helping children) 1998 onwards
Superusers are not PlusNet staff but do have a direct line of communication into the business to raise issues, concerns and feedback from the Community.
trugmaker
Dabbler
Posts: 17
Registered: ‎12-10-2012

Re: SEO improvement with redirect

Done that a couple of weeks ago - but still getting the warnings from the SEO checkers, just wonder how doing it that way helps!

spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: SEO improvement with redirect


@trugmaker wrote:

After using several seo checker sites, several times, one aspect keeps raising it's head! Google regards www. and non www. as two different sites. This is bad! So, am I correct in believing that I :-

1) Create a wordpad document which reads:-

RewriteEngine on
RewriteCond %{HTTP_HOST} ^trugmakers.co.uk [NC]
RewriteRule ^(.*)$ http://www.trugmakers.co.uk/$1 [L,R=301]

2) Save as .htaccess  (and should it be .htaccess.txt or without the .txt)

3) Insert this file into my ht.docs directory


That .htaccess access file should work, though the right hand side of the RewriteCond line should have backslashes in front of the dots to make them into real dots and not 'any character' regular expressions. That is the file should contain

RewriteEngine on
RewriteCond %{HTTP_HOST} ^trugmakers\.co\.uk [NC]
RewriteRule ^(.*)$ http://www.trugmakers.co.uk/$1 [R=301,L]

Is that .htaccess in place now? If so it doesn't appear to be effective. If one enters trugmakers.co.uk in the browser address field the entry *should* be rewritten to have www. in front of it, but that doesn't happen.

Rather than using Wordpad to create the file I suggest using Notepad which lacks any capability to 'help' by adding unwanted text processing formatting. So there's less to go wrong.

When creating the file using Notepad it should be saved on your PC as htaccess.txt (no leading dot). This means the file will have a name (htaccess) and a type (txt); Windows will know how to handle it and ensure it has correct ASCII (CRLF) line endings.

Next you use your FTP program to upload the file to /htdocs on Homepgaes, making sure the transfer is done in ASCII mode. Normally this will convert the file to Linux (LF) line endings, meaning the file on the server will be a few octets shorter than on your PC.

The final step is to use the FTP program to rename the uploaded file as .htaccess, ie remove dot-txt from the end and add a leading dot.

The leading dot makes the file a hidden one and your FTP program might not show it unless you turn on a 'show hidden files' option.

Now browse to trugmakers.co.uk to see if www. is added to the address entry. Cool

David
Penny
Superuser
Superuser
Posts: 1,313
Thanks: 809
Fixes: 8
Registered: ‎05-04-2007

Re: SEO improvement with redirect

spraxyt wrote: That .htaccess access file should work, though the right hand side of the RewriteCond line should have backslashes in front of the dots to make them into real dots and not 'any character' regular expressions. That is the file should contain

RewriteEngine on
RewriteCond %{HTTP_HOST} ^trugmakers\.co\.uk [NC]
RewriteRule ^(.*)$ http://www.trugmakers.co.uk/$1 [R=301,L]  

... having read what you wrote, I thought I'd try this Smiley  but I couldn't make it work (repeated 500 errors, and hastily-replaced previous .htaccess set-ups).

It was only when I went to reply to your post, that I saw (from the source code) what the code you'd written actually *says* (which is not the same as what appears in the box on your post) (no clue as to why).

I had to use } for the right-hand curly bracket (after HOST) to get the code following that word, to appear.

I have now used the *actual* code and it works perfectly : D    sunshinecity.co.uk now appears with a www regardless of whether I put a http:// in front of it, or not.  Well pleased Smiley  and thank you.

Penny Rollo * * * joined Force9 on 17/02/98 * * * with PlusNet from 2000 onwards * * * personal website at pennymidasrollo.plus.com
Project HappyChild website (free educational resources for kids and schools, plus directory of charities helping children) 1998 onwards
Superusers are not PlusNet staff but do have a direct line of communication into the business to raise issues, concerns and feedback from the Community.
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: SEO improvement with redirect

@Penny Glad to hear you got that working eventually. Smiley

This is going off topic but I wonder if the loss of the right curly brace is due to IE11? Viewed in Firefox 46.0 or in IE9 it's there. Viewing the HTML code for my post shows the code with all characters present. It's enclosed in <pre>...</pre> tags since I used the Code entry button (the one between 66 and the smiley) to insert it.

On screen the code appears in a grey box, but I expect that is CSS at work.

David
Penny
Superuser
Superuser
Posts: 1,313
Thanks: 809
Fixes: 8
Registered: ‎05-04-2007

Re: SEO improvement with redirect


@spraxyt wrote:

 

I wonder if the loss of the right curly brace is due to IE11? Viewed in Firefox 46.0 or in IE9 it's there.

 


... yes, just checked in FF and it is indeed there : /

have taken a screenshot of how your post looks in IE11, enclosed below.

Penny Rollo * * * joined Force9 on 17/02/98 * * * with PlusNet from 2000 onwards * * * personal website at pennymidasrollo.plus.com
Project HappyChild website (free educational resources for kids and schools, plus directory of charities helping children) 1998 onwards
Superusers are not PlusNet staff but do have a direct line of communication into the business to raise issues, concerns and feedback from the Community.
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: SEO improvement with redirect

@Penny Thanks for the picture. The loss of text by IE11 after right curly braces is even worse than I'd thought. Sad

David
trugmaker
Dabbler
Posts: 17
Registered: ‎12-10-2012

Re: SEO improvement with redirect

Hi, thank you both, I followed your perfectly understandable direction spraxyt to the letter and can see no obvious problems at all. I typed in both www.trugmakers.co.uk, and without the www, both came up no problem. But how can one tell if it is actually doing the job? Because I could access both before. The redirect was supposed to redirect 'TO' www (as this is the address I use in all advertising). When my website loads there is no www. prefix at the top of the page, but then whatever site I load there is no prefix. So how can I check if I have achieved our objective?

Thank you again

spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: SEO improvement with redirect

Fix

It does work now, whereas it didn't previously. Smiley

To check the redirect works, type just trugmakers.co.uk into your browser address bar. You should find the address is redisplayed with www. added in front of it and the site displays with the www.  address.

This www. redirect happens even if the original address goes to an address within the site. (Try it to check.)

Now that this permanent (301) redirect is in place crawlers should notice this on their next indexing visit and update their links accordingly. In time this should help site (SEO) ratings.

Note: The redirection is what I see using Firefox on Windows Vista.

David