Hi, I am little bit confused in 301 redirect
-
Hi, I am little bit confused I have set my preferred domain to www but anyone can access my site via both www and non www domains, do I need to 301 redirect all non www to www or not , If yes then I want to know Why and If no then also I want to Why.
-
Hi Amarjit,
If you set up the preferred domain in Google Webmaster, in reality that should be fine for most SEO purposes.
That said, it's still best practices to redirect visitors to one version or another. It's doubtful you'll see much SEO benefit from it, but it might make things easier from a consistancy point of view, and it's long been a regular practice of most SEOs.
You can read more about it here: http://www.seomoz.org/learn-seo/redirection
Best of luck!
-
Hi Mike,
Actually, I could be wrong, but I don't believe this is required. Google will ask during setup if you want to track subdomains, (and technically www is a subdomain) but I believe this is mostly for the benefit of how the data is displayed in the reports.
For www or non-www, Google will 'count' both as long as the tracking code is on the page. Depending on your analytics setup, you may or may not be able to determine if the visitor landed on a www page or not, but the page visit will register.
Does that make sense? I'm being very broad here, apologies for that.
-
Yes I got, Thanks
-
You would need to setup Google Analytics with a www version and a non-www version to view traffic information. Same goes for managing your site, you need to setup both version in Google Webmaster Tools if you want to see data for both.
Google views the non-www version and the www version as two separate sites, that is why you need to set it up twice if that is the route you choose to take.
Does that answer your question?
Mike
-
Hi, Thanks to all of you. Actually I want to ask if I will not redirect than if someone is coming to my non www version that visit will be counted by google analytics ? or not
-
When you say "set my preferred domain to www" do you mean via webmaster tools? if so google does not have control over your site, so of course there will be no forced redirect.
www.yourdomain.com is different from yourdomain.com, so you can pr can be split (if your backlinks are a mix of both).
should you do a force redirect for www, via htaccess? yes, why? its good practice and easy to do. also it will fix it for bing and other search engines
-
Without additional information, I can only make a guess on your first comment, "I have set my preferred domain to www..." - are you talking about doing this is Google Webmaster Tools? If so, that is simply telling Google that you would prefer they index your www version versus your non-www version.
Depending on your CMS, you should be able to write some code to automatically redirect all non-www calls to your site to their www counterparts. If you are using IIS, you'd edit your web.config file. If you are using Apache, you'd edit your .htaccess file.
Does that make sense?
Mike
-
If you have set your preferred domain then its fine. It means you have already told Google about your preference.
If your website is old and you have made several backlinks on you non-preferred domain then link juice will not be transfer. It will be a better practice if you will do it also through 301 redirection.
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
-
I have lose my ranking Via 301 Redirection - How To Recover?
Hey, Folks! I Have Used 301 Redirection Method to Increase My Rankings but When i applied this Method My Website Ranked Down To 55 Numbers. Can anyone Suggest me How to Recover it?
Technical SEO | | SumitJiGupta0 -
301 Redirect Url Within a Canonical Tag
So this might sounds like a silly question... A client of mine has a duplicate content issue which will be fixed using canonical tags. We are also providing them with an updated URL structure meaning rwe will be having to do lots of 301 redirects. The URL structure is a much larger task that than the duplicate content so i planned to set up the canonicals first. Then it occurred to me id be updating the canonical tags with the urls from the old structure which brings me to my question. Will the canonical tags with the old urls redirect credit to the new urls with the 301? Or should i just wait until we have the new url structure in place and use these new urls in the canonicals? Thanks!
Technical SEO | | NickG-1230 -
301 redirect file question
Hi Everyone, I am creating a list of 301 redirects to give to a developer to put into Magento. I used Screaming Frog to crawl the site, but I have noticed that all of their urls 302 to another page. I am wondering if I should 301 the first URL to the url on the new site, or the second. I am thinking the first, but would love some confirmation. Thank you!
Technical SEO | | mrbobland0 -
301 redirect of a subdirectory
Hello! I am working on a website with the following structure: example.com/sub1/sub2/sub3. The page "example.com/sub1" does not exist (I know this is not the optimal architecture to have this be a nonexistent page). But someone might type that address, so I would like it to redirect it to example.com/sub1/sub2/sub3. I tried the following redirect: redirect 301 /sub1 http://example.com/sub1/sub2/sub3. But with this redirect in place, if I go to example.com/sub1, I get redirected to example.com/sub1/sub2/sub3/sub2/sub3 (the redirect just inserts extra subdirectories). If someone types "example.com/sub1" into a browser, I would "example.com/sub1/sub2/sub3" to come up. Is this possible? Thank you!
Technical SEO | | nyc-seo0 -
301 redirects
Hi, I am a working on a new web site, and I want to redirect all the urls of another site (on a different host) to this one. According to both hosts it is "impossible" to do this for all urls. I don't believe that to be the case, but how do I do this? And, should both sites be hosted on the same server first?
Technical SEO | | vibelingo0 -
Index.php and 301 redirect with Joomla
Hi, I'm running Joomla 1.7 with SEF on and I'm trying to do a htaccess redirect which fails. I have approximately 100 in effect so far and all working fine, but I have one snag. Index.php is not working as I need it to when it's redirected to www.myurl.com/ If I turn on index.php redirect to root using this code #index.php to root
Technical SEO | | NaescentAdam
RewriteCond %{HTTP_HOST} ^myurl.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.myurl.com$
RewriteRule ^index.php$ "http://www.myurl.com/" [R=301,L] And then go to www.myurl.com/test.html I'm redirected to the homepage. I think this is because all pages are index.php in joomla. SEOMOZ and Google both think that index.php and root are duplicate pages. Does anyone have any advice for overcoming this? Thanks, Adam0 -
What are the SEOmoz-suggested best practices for limiting the number of 301 redirects for a given site?
I've read some vague warnings of potential problems with having a long list of 301 redirects within an htaccess file. If this is a problem, could you provide any guidance on how much is too much? And if there is a problem associated with this, what is that problem exactly?
Technical SEO | | roush0 -
301 Redirect?
Sometimes I want to redirect pages on my site. Like a search result: http://www.inthelighturns.com/memorials/catalogsearch/result/?q=hearts to a page designed for what they're searching for: http://www.inthelighturns.com/hearts.html There's no real worry about transferring page rank and this may not be a permanent redirect. Just a "I want this page to show this page for some time" kind of redirect. What's the best solution? Thanks Tyler
Technical SEO | | tylerfraser0