Justin
(@justingreerinteractive)
What are you using for the redirect (.htaccess, DNS) ?
Using .htaccess (if DNS is not trumping the redirect) can be written something like
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
The above will redirect to a non-www version and keep the request URI
How can I determine how it is being redirected? I have a .htaccess file, and I have been messing with it but havent noticed any changes so far. Even if I delete the .htaccess, everything acts the same.
Justin
(@justingreerinteractive)
Put this code at the very top of your .htaccess file.
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
If you can go to your domain using www. and you are not forwarded to the non-www version, then more than likely your DNS is the one redirecting and you will have to setup your DNS correctly.
I just recently had this issue with a client. Lets say someone visited http://www.domain.com/blog/this-is-a-page-title, they would be redirect to http://domain.com instead.
if you do not know how to edit your DNS settings then I would contact your hosting provider and ask them to do it or you
I put that into the top of my .htaccess, and nothing changes. All the behavior is exactly the same.
I’m having someone look into the DNS settings as well. Unfortunately, I don’t have access to that myself.