View Full Version : One URL For SEO Benefits

09-25-2014, 09:33 PM
Thought I'd start a new thread to better explain the problem.

I have several ways of reaching my website:


Ideally, I want all the other redirected to http://www.abcxyz.com/ only.

I know how to do 301 redirect for individual pages and I've tried 301 redirecting the complete domain, but not sure if I'm not putting in the correct code.

I'm causing myself duplicate content problems and wasting valuable link juice when it should be condensed to one domain.

Any help most appreciated.

09-25-2014, 11:56 PM
# Redirect non-www urls to www
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.yoursite\.com
RewriteRule (.*) http://www.yoursite.com/$1 [R=301,L]

09-26-2014, 01:11 AM
Many thanks.
I'm getting this now when typing in the url:

You don't have permission to access / on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Never had this before.

Code put in .htaccess file:

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

index.html is still available and does not convert to www.

09-26-2014, 01:34 AM
Me again :) Please ignore previous post.

I noticed that when I was typing in the url it began with https and not http has it should have done, hence the 403 forbidden messages.

It is working fine so thanks for your help.

The only problem now is that /index.html is still there and it does not convert to the www.