Redirecting a domain
-
I was setting up a new campaign and received the following error from Roger Robot.
"We have detected that the domain www.sitename.com and the domain sitename.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."
I know about redirecting a PAGE using 301 Redirects and how to specify the www. canonical in Google webmaster tools, but is there a "DOMAIN" redirect that I'm missing.
What would you suggest doing given the error message above.
Thanks,
Bill
-
I thought it would be super cool if someone would post the exact syntax to use in .htaccess to make this happen. For all the hordes of info out there on redirects and htaccess, it's amazingly hard to find the code for this one. Here is what worked for me:
<code>RewriteCond %{HTTP_HOST} ^example\.com$ [NC] RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]</code>
-
I looked at the server headers for the URL mentioned in the screenshot, and the site is running IIS6. I don't have the instructions for doing the domain redirect for that handy, and it's been ages since I've done it, but at least now we know we can't just say use .htaccess.
-
Thanks for the info.
I'll dig in and see what I can find.
-
I'm getting access to the FTP and Host Server.
If they have a cPanel I'll look for that. May need your help later, once I know more what I'm dealing with.
Thanks so far
-
If you're using Firefox, go get the Domain Details addon
https://addons.mozilla.org/en-us/firefox/addon/domain-details/
Then go surf to your site and it should tell you (based on the headers) what kind of server you're running (for instance, seomoz is running Apache 2.2.14)
The most common solution is using htaccess, which can determine at the server level which version to show and 301 all traffic there. Not all web servers support this, though (which is why Kyle asked the question). IIS7+ can support it, as can the most popular open source ones (nginx, lighthttpd, Apache).
Here's an article on how it works
http://www.seomoz.org/blog/rewriterule-split-personality-explained
-
You would probably need more information than just looking at the client side. The only way that could work out is if the file extensions were .aspx or .php or something like that.
Essentially what i was getting to, is you would set the redirect differently depending on what type of hosting you are using. If it was microsoft base you would set it in IIS, while if it was linux based you would added it to your root .htacess file.
Hope that helped!
-
not sure... this site belongs to a friend. Can I tell from just looking at the html or do I need to access the server/host?
-
What type of hosting/server do you have linux based or microsoft?
-
Hi Bill.
Your issue is a common one and yes, there is a solution.
First step is to determine which version of a URL you wish to represent your site, with or without the www. For purposes of this discussion I'll assume you wish to keep the www prefix. In that case, you need to set up a redirect to send all non-www traffic to it's www equivalent.
If you have cPanel access to your web server, you should find a Redirect tool there. Otherwise, you need to modify your htaccess file. If that less sentence is not something you are familiar with, then contact your web host and let them know your wishes. They can easily set this up for you.
For a demo of how it works, type in "google.com" in your web browser. Notice how the address is always changed to http://www.google.com/. That action is because of a properly configured redirect.
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
-
Which better to rank with 40 DA domain redirect the domain 301
hello, which better to rank with 40 DA domain redirect the domain 301 to my website or host domain and create posts with my website link + if i do the 301 redirect the Crawl Errors of old 40 da domain will display on my new website or not+how much links can i get from one website pbn
Technical SEO | | cristophare79
+
which better get links for home page or postsbest regards ,0 -
Migrating domains from a domain that will have new content.
We have a new url. The old url is being taken over by someone else. Is it possible to still have a successful redirect/migration strategy if we are redirect from our old domain, which is now being used by someone else. I see a big mess, but I'm being told we can redirect all the links to our old content (which is now used by someone else) to our new url. Thoughts? craziness? insanity? Or I'm just not getting it:)
Technical SEO | | CC_Dallas0 -
Preferred domain
In GWT it gives an option to do the following but which is best? and why? If you specify your preferred domain as http://www.example.com and we find a link to http://example.com, we'll consider both links the same. | <label for="no_assoc">Don't set a preferred domain</label> |
Technical SEO | | jwdl
| <label for="use_www">Display URLs as ** www.example.com**</label> |
| <label for="use_nowww">Display URLs as example**.com **</label> |0 -
Should a 301 from a penalised domain to a new domain be removed?
A business traded on a domain let's say example.COM which was heavily penalised due to non-removable spammy back links. Their previous SEO advised them to set up on example.CO.UK but redirected example.COM to example.CO.UK. Example.CO.UK ranks very poorly, presumably due to being 'tarred with the same brush' i.e. attributed with the ills of example.COM. Will it do any good to remove the redirect or is example.CO.UK now doomed as well?
Technical SEO | | Ewan.Kennedy1 -
.ca and. com domains
Hello, currently the main site im working on is a .com, but have the .ca version purchased from register.com. should i have this setup to redirect to the .com site. will google see these as dup content. We have the .ca for our canadian customers but both sites are identical. Thank you
Technical SEO | | TP_Marketing0 -
How do I resolve Twin domains? redirect website.com to www.website.com?
I am new to this website. Tried to run a campain and got a warning that website.com resolves to www.website.com which hinders SERP by competing for Keyword indexing!. (website is my domain name) Would appreciate help with this. Thanks. S.H. PS: here is the exact wording of error : We have detected that the domain www.yfvaccine.com and the domain yfvaccine.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.
Technical SEO | | sherohass0 -
Beating a keyword Domain
Has anyone here managed to beat a keyword/exact match domain to top spot? I am currently second and wondering if it is worth the time and effort to knock it off the top spot. How hard is it to get these very annoyingly favoured domains off 1st? Any help and advice much appreciated.
Technical SEO | | pauledwards0 -
Referrals from widget domains
Let's say you are doing seo for a company that sells 5000 widgets. Let's call their site www.mainsite.com ... They have already set up ( purchased ) many domains such as www.widget1.com which is one of the widgets they have on their main site. so they might have several hundred of these domains. What is the best use of these domains? Would it be : Have those pages be landing pages with content and pictures and optimized with a link to their main site widget page? Or have that domain have a 301 redirect to go their main site, to the particular page showing that widget for sale off their main site? Miscellaneous sidebar question - Since both the main site widget page and the widget domain might be in competition and might have duplicate content, what are the ramifications of not using the canonical tag, and what other considerations might there be? How much must be duplicate content before considering using the canonical tag?
Technical SEO | | highersourcesites0