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
-
Using one domain for email and another domain for your website, but redirects...
Hello - We are rebranding and our new name is fairly lengthy. We own all main domain versions of our brand name - .com, .new and .org - There is a very high search volume for the new brand name as it is a merger of 2 popular existing brands so want to take advantage of that and use our full name within our website domain name. However, since the name is a little long as mentioned - 25 characters - we also own the 3 character acronym of the new brand so we are debating on using the acronym for our new email addresses. ie name@abc.com so it is user friendly. We would obviously redirect the acronym email domain to point to the longer website domain. Are there any negative SEO effects if we do that? Use the longer domain for the website and shorter acronym for our email? Thank you
Technical SEO | | KRBishopBh1 -
Should I be concerned about Google indexing an old domain if the listings redirect to the new domain?
I noticed this about Moz's old domain SEOMoz.org. If the URLs from the old domain are redirecting, is there any reason to be concerned about an old domain still appearing to be indexed by Google? See here: https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=site%3Aseomoz.org Links to seomoz.org are listed, but if you click them they redirect to moz.com. Is this anything to be concerned about or is everything operating as expected?
Technical SEO | | 352inc0 -
301 Redirect Help
How would you 301 redirect and entire folder to a specific file within the same domain? Scenario www.domain.com/folder to www.domain.com/file.html Thanks for your Input...
Technical SEO | | dhidalgo11 -
Multiple domains on the same hosting
Hello, I have around 80 sites (different domains) which are on the same host. Everytime I look up the IP of these domains, it gives me the same IP. The sites are interlinked, all linking to the main domain. My question is: Does the off site link building have effect on the 80 sites?
Technical SEO | | Arianittt0 -
Domain redirect seo
Hello, my domain www.pacomarca.com and when i start the new campaing i get this pronblem: We have detected that the domain www.pacomarca.com and the domain pacomarca.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. my domain is in networksolutions.com. how can i resolve it? many thanks Gonzalo
Technical SEO | | Kuna0 -
301 Redirect
The SEOmoz crawl campaign found some 404 errors in my Joomla site poker-brands.ca. So, I figured I would set up 301 redirects in my hosting account to make sure bots don't read that there is a page missing. For example: This link gave a 404 error in the crawl: http://www.poker-brands.ca/download-pokertracker-software/holdemmanager I redirected it to: http://www.poker-brands.ca/download-pt3-pokertracker-software/holdemmanager-hem-hm2 However, when I visit the first link it doesn't send me to the second link. Am I supposed to get forwarded to the second link now?
Technical SEO | | Uramark0 -
Domain authority and rankings?
I have a site that sits in #1 position for its keywords right now. But it only got there about 1mth ago. The site is only about 6mths old with lots of link building. I check the domain authority and its only 37/100 with the #2, #3 sites having domain authority of 57 and 82 respectively. This site has like 800+ backlinks. While the #2 and #3 sites have 20,000+ backlinks. Does it mean that my site will LIKELY drop in rankings very soon? I know there is no certainty but wld you say that it is highly probable my site will drop?
Technical SEO | | jl2550 -
301 Redirect with an Exact Domain name Match
My Client had a site that ranked for a pretty competitive two word phrase, but for a variety of reasons had to transfer the site to a different domain name (with none of the previous keywords). We've 301'd everything just fine to the new site, but our traffic for that two word phrase, as well as related long tail traffic, is beginning to drop. Could the drop be related to something that we didn't do well in the transfer? Or is it due to the new domain name now not being an exact match? Sitenote question: Our Google Analytics is still set up for the former domain name and shows data just fine. Is there any reason to switch GA to the new domain? What are the pros/cons? Much thanks in advance!
Technical SEO | | TrevorMcKendrick0