How to redirect www.xxx.com to xxx.com or vice versa
-
Roger has detected a problem: We have detected that the domain www.xxx.com and the domain xxx.com both respond to web requests and do not redirect. Having two "twin" domains that both resolve forces them to battle for SERP positions, making your SEO efforts less effective. We suggest redirecting one, then entering the other here.
hi, i tried creating the campaign and this message popped out.. i dono what to do or how to redirect b/w www.xxx.com and xxx.com ( xxx = hidden site) am using godaddy domain and hosting at hostgator.
thank you.. waiting for ur reply
-
OK - just a REFRESH problem!
I canceled the campaign creation and started from scratch again. And this time I had no error message.
Thanks everyone!
-
Hi everyone, I had the same problem and found this wonderful thread! Thanks a lot! Now, if I check the header of http://domain.com with the tool you suggested, I get the correct message:
HTTP/1.1 301 Moved Permanently Date: Sat, 22 Oct 2011 09:13:19 GMT Server: Apache Location: http://www.domain.com/ Content-Type: text/html; charset=iso-8859-1
However, when I try to continue with the campaign creation on SEOmoz, I stille get the same message as I did before. Is there a way to fix this? Am I doing something wrong? Here is my .htaccess:
ptions +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteRule ^index.html?$ / [NC,R,L]
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]
Thanks for your help! I hope you can guide me to sort things out!
-
yes it works.. thanks keri
-
Yes, the 301 response is what you're looking for. Test a couple of your interior pages in addition to just your home page to make sure it works right, then you're good to go!
-
Here's how I do it in .htaccess in Linux:
RewriteEngine on RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule .* http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
If you already have a RewriteEngine in your .htaccess, you can skip that part.
What this does is check if the host contains www. If it doesn't it redirects to www. version. You can find more info here: http://www.stevefortuna.com/redirect-to-www/
-
1. Requesting: http://xxx.com
<dl>
<dt>server Response:</dt>
<dd>HTTP/1.1 301 Moved Permanently Date: Wed, 06 Jul 2011 11:42:26 GMT Server: Apache mod_fcgid/2.3.6 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Location: http://www.xxx.com/ Cache-Control: max-age=3600 Expires: Wed, 06 Jul 2011 12:42:26 GMT Vary: Accept-Encoding Content-Type: text/html; charset=iso-8859-1
</dd><dd>I got this.. is this right?
</dd></dl>
-
-
There are few safe ways you can re-direct your domain from non-www to www, they include:
-
having a small code in your .htaccess if you are running linux
-
in your header, you can specify where to redirect your site
We need to know the sort of platform your site is running on i.e. Windows; Linux as well as the platform or scripting language you are using i.e. asp; .NET or php
Also make sure in your webmaster tools to allow Google to know which one to use, so in your webmaster tools specify you want to use the www or non-www
Hope this helps, if you need more advice or help let me know
-
-
To see if you did it correctly, put in the non-www domain into a server header checker like http://www.seoconsultants.com/tools/check-server-headers-tool/ and see if it uses a 301 redirect to redirect to the www domain (or vice versa, if you set it to remove the www).
If that didn't work, we're happy to help walk you through doing this! What we'll need from you is a little more information about your server. Specifically, if you're using IIS or Apache, and if you're using a content management system. That will help us give you the right info if you still need help.
-
i think i did it...
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Need to fill out supplier form to pay for Moz Con
First of all, I wish there was an email I could contact for this. I am planning on attending Moz Con next month with my company. However the policy internally is that in order for my company to cover the conference, I need to get someone from Moz to fill out our new supplier form. Is there anyone that can help out with this? Any insight or answers would be much appreciated.
Industry Events | | Fabianne1 -
SEO Events and Networking in Bangkok - 2017
Hi all. Any local events or networking opportunities you can recommend in Bangkok? I've relocated here for 2017 and would enjoy meeting up with any fellow Digital Marketers.
Industry Events | | RyanPurkey0 -
Ecommerce & SEO - Conference?
Hi I was wondering if any one can recommend a conference/workshop on ecommerce & SEO In the UK 🙂 Thanks!
Industry Events | | BeckyKey0 -
Ppc or organic to promote membership site
HI,
Industry Events | | corn2015
When promoting a membership site and trying to get members quickly, is it best go to organic or PPC? A person is interested in developing a site targeting the college student/higher education market. Corn0 -
Social bookmarking effectiveness
HI,
Industry Events | | corn2015
Is social bookmarking still an effective method to build backlicks and increase exposure/traffic? Corn0 -
Looking for info on content marketer
Hi,
Industry Events | | corn2015
I'm thinking of using this tool. Does anyone have any feedback on how well it works?
https://contentmarketer.io/0 -
Inbound links acquired link to some domain prior to redirecting back to us - is it worthy ??
Hi, We recently ran a competition through a seoPR agency to acquire inbound links from articles created by bloggers in the niche. It turns out that the anchor text from those articles (<a href=""></a>) are linked to a subdomain (complex long text url) of that agency's site before redirecting to us. I am put off a little bit now and want to know if that was a rip off. Could anyone tell me that if those links are worthy for SEO for us?? What should I do now? Could anybody can help me please. Any experience is appreciated! Regard,
Industry Events | | LauraHT
Stephen0