Moz Q&A is closed.
After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.
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
-
Attending MozCon 2015 and Interested in Connecting with Marketing Professionals
Specifically interested in meeting other real estate marketing professionals. Would love to start a forum for the guest list here. Let's connect!
Industry Events | | jonathanboatwright
Brittanie Flegle
@brittanieflegle also posting as @realtyaustin
brittanie@realtyaustin.com2 -
How to increase pageviews for a news website when all the most common SEO strategies were already used, and they´ve reached a plateau of visits?
These clients are regional news’ websites which have already reached their apex of visits - most of these results were linked to the SEO strategies developed by our team in the past few years. But now, the most common SEO strategies don't show the same effect: a higher number of pageviews. What kind of strategies you suggest to increase this number? Thank you!
Industry Events | | Kenaum1 -
Going to Mozcon - what to do in Seattle
Hi I know this isn't technically an SEO question, but wanted people's advice. As I am flying half way round the world I am actually arriving on the Friday and have Friday evening, Saturday and Sunday to go and explore Seattle. I plan on going to watch a baseball game and visit the home of Starbucks (and I hate coffee, but thought might as well visit), but what else would people recommend doing / seeing in Seattle. Thanks in Advance Andy
Industry Events | | Andy-Halliday2 -
Is It Possible To Use Multiple Promotional Codes for Google AdWords?
I am managing two separate Google AdWords accounts and with one I was able to add 3 different promotional codes so I got $300 of Google AdWords for free. I signed up for Google AdWords for another business with a separate login e-mail address. I used the code that I was able to generate and a few days later I recieved an additional code in the mail. I tried to use this code and it said I was only able to use one promotional code per account. Does anyone know why Google has this inconsistency? Was I just lucky the first time or is it possible to use multiple vouchers? Thanks
Industry Events | | DR700950 -
[UPDATED] Any Q&A Regulars Attending MozCon Next Week?
[Update] Between here and the MozCon Facebook Group we've got a number of folks interested, so we're going to grab a table together for lunch on Tuesday at the conference. I'll try to mark it with something noticeable, or you can tweet me @thompsonpaul and I'll let you know where to find us. Hope to see lots of us there! [/Update] Hey gang - I'm wondering which Q&A regular (or irregular!) contributors are coming to MozCon next week? I know Dana Tan and Marie Haynes are for sure. So who else is coming? If there's a bit of a gang of us, it would be fun to connect up for a lunch table or a drink at some point during the event to meet each other face-to-face. Let me know in the comments, and if there are enough of us, I'll set something up. Paul
Industry Events | | ThompsonPaul1