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
-
Is there a tool out there to check any domain that might be pointing to my existing domain?
Is there a tool out there to check any domain that might be pointing to my existing domain?
Technical SEO | | adlev0 -
Do you still loose 15% of value of inbound links when you redirect your site from http to https (so all inbound links to http are being redirected to https version)?
I know when you redesign your on website, you loose about 15% internally due to the 301 redirects (see moz article: https://moz.com/blog/accidental-seo-tests-how-301-redirects-are-likely-impacting-your-brand), but I'm wondering if that also applies to value of inbound links when you redirect your http://www.sitename.com to https://www.sitename.com. I appreciate your help!
Technical SEO | | JBMediaGroup0 -
Linking Root Domains after Site-Wide Redirect
(Edited for simplicity) Page #1 on site A has links from 5 different root domains. If I 301 that page to a page on site B that has zero links, will site B gain 5 linking root domains, per the Moz tool? Thanks.
Technical SEO | | ClearPoint0 -
Magento Redirect Loop
On my clients site I changed the URL structure for products. First they had a trailing slash: http://www.wellamy.com/market/food/oklahoma-relief-effort/healthy-snacks/caramel-apple-chewy-snack-bars/ I changed it to end in .html http://www.wellamy.com/market/food/oklahoma-relief-effort/healthy-snacks/caramel-apple-chewy-snack-bars.html Now rather than redirecting properly, it causes a redirect loop. Any idea how I can fix this?
Technical SEO | | Imajery0 -
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 -
Is it better for our Blog to be blog.domain.tld or domain.tld/blog ?
I'd dread the answer being the latter rather than the former as we've spent two years building it blog.domain... However I noticed SEOmoz are domian.tld/blog and it got me thinking.... Cheers. R.
Technical SEO | | RobertChapman0 -
Parking Domains
I currently have a website domain.com.au, an American branch of the company who own domain.com are currently having their site built and want to forward there domain.com to domain.com.au while construction is taking place. Are there any negative effects to parking the domain.com on my domain.com.au? What is the best method to do this without causing any problems for my domain.com.au?
Technical SEO | | Pork0 -
Top Level Domains
Howdy Everyone, I have a website that will span multiple countries. The content served will be different for each country. As such, I've acquired the top level domains for different countries. I want to map the cop level domains (e.g. domain.co.uk) to uk.domain.com for development purposes (LinkedIn does this). I'm curious to know whether this is adviseable and if mapping a country-specific TLD to a subdomain will maintain local SEO value. Thanks!
Technical SEO | | RADMKT-SEO0