Author jemmasta
2013
1
Premium
Rank 72989

The tutorial will show how to redirect all your traffic to you non www domain by modifying your .htaccess file.

If you are running your site on siterubix site or any other subdomain site which has the domain like: subdomain.topdomain.com, THIS TUTORIAL DOES NOTHING FOR YOU. The issue is only on top level domains like www.yoursite.com

Here are the lines you need to add to your .htaccess file shown in the video:

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

Leave critic, comment or question below. This is my first tutorial, so all feedback is very welcomed. :)

Join the Discussion
Write something…
Recent messages
gmegs Premium
I don't get this concept at all. When you sign up for a domain www.whatever.com, how would one know that we would actually get 2 domains, and that that fact alone would hurt rankings - seems that this should be brought up in the very basic courses if it is true - - I'm learning so please forgive! And when signing up for a domain, why is there not an option to turn the 2nd domain off or something? I also own another site (for seniors) I have had for a number of years that ranks about as high as it can get (regional site) - why am I doing so well then? - again, I'm just trying to learn - thanks
Reply
jemmasta Premium
Well, it's a bit hard to explain. :) Technically you do have one top level domain. But www prefixed domain and the one without point to same place physically. It is not wise to turn one or other off, also I think it's not really possible.

This is just how the search engines sees these two as separate entities even though they should be single one. That is why in Google Webmasters Tools, there is the option "preferred domain". Thing is, that setting is Google specific. This solution here works for all.

I'm not saying that not doing this will 100% devalue your rankings. I'm saying it might, it's just a small piece of the whole puzzle. Who is to say your rankings might not improve, by taking care of this little thing. Thing is the is no certainty if this will help you in particular. But it can't hurt you either. The problem is real and this is a fix for it. :)

If you have an established site, that ranks well already I hope the duplicate content issue never happens because of this issue. It is just wise especially when you're starting make these two work as one.

No need to apologize, I know this goes a bit deeper into the technical side. It's always fine to ask. :)
Reply
healthywendy Premium
Thanks Jemmaster :-)
Reply
healthywendy Premium
Very useful information - thank you! The video plays fine on my PC. Would you mind showing me how to do the reverse? That is redirect to www. I'm not sure that this is even necessary, but one of my sites comes up without the www. Thank you.
Reply
jemmasta Premium
The switch to www requires a bit more things to do. First off, it doesn't work well on WA hosting that way. Either your site goes to endless loop or you can't access your admin. Not sure why, might need to change something in database. That's why I left it off from this tutorial.

It doesn't matter which domain is used as long as they work as one. That's the thing that matters.
Reply
welshy Premium
Nice video Aarne, do you know why some wordpress sites automatically redirect to the preferred domain and other don't?
Is it a hosting related setting?
Reply
jemmasta Premium
I guess it's a matter of hosting specific settings. Although it's very rare because it would mean the the rewrite module would be run on server settings level and that's not very wise to do as a hosting company. It can also be related to webserver software used. Can't be sure though, too many variables. :)
Reply
jemmasta Premium
And thanks! :)
Reply
jemmasta Premium
NOTE: I noticed the video and audio is out of sync at least on tablet. If you're experiencing same, please let me know. I'll test video more and make changes if needed.
Reply
Top