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
-
Reusing an already 301 redirected URL for a very important keyword
I have a question about reusing an already 301 redirected URL Till now I never reused an URLs that has been already redirected with a 301 redirect. However, I just started working on a website where in past they created a lot of 301 redirects without thinking about the future, and now certain URLs, that are currently redirected with a 301, would be very useful (exact match) and needed (for some of the most important keywords for this specific business), to maintain an optimal, homogeneous and "beautiful" URL structure. Has any of you ever reused a URL that was previously redirected with a 301 redirect? If yes what are your experiences with it? Can content on the reused URL (that was previously 301 redirected and than the redirect removed) normally rank if the page is reestablished and the redirect is removed (and you do great content, on page, internal linking, backlinking, .... ) or is such an URL risky / not recommended / "burned" forever and not recommended to be reused again... especially for very important keywords since it present the exact match ?! Thank you very much for all your help! Regards
Technical SEO | | moz46y0 -
Meta descriptions and h1 tags during a 301 redirect
My employer is shifting to a new domain and i am in the midst of doing URL mapping. I realize that many of the meta descriptions and H1 tags are different on the new pages - is this a problem ? Thank you.
Technical SEO | | ptapley0 -
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 -
301 Redirect / cross-domain canonical to a URL w/ Ampersand
I have a question regarding ampersands, we are needing to redirect to a URL w/ an ampersand in the URL: http://local.sfgate.com/b18915250/Sam-&-Associates-Insurance-Agency Will Google pass page authority/juice despite the fact that there is an ampersand in the URL, if we were to 301 redirect or cross-domain canonical to the url? Should we 301 redirect to http://local.sfgate.com/b18915250/Sam-%26-Associates-Insurance-Agency instead of http://local.sfgate.com/b18915250/Sam-&-Associates-Insurance-Agency? I don't have the option of removing the ampersand Thank you for your time!
Technical SEO | | Gatelist0 -
A script to automatically write 301 redirect rules to htaccess?
I was wondering if anyone could help provide some resources on how to automatically write 301 redirect rules to htaccess. Allow me to explain... I'm building a new website and the primary users are businesses. They have their own profile pages on the site. The URL is based off of their Company Name. In the event that they decided to change their name... reasons being, perhaps they mispelled it the first time, or they're removing LLC or adding Inc, I want to also change the URL and redirect the old URL to the new URL. Since the URL is based off of their Company Name, making a change to the company name would make a change to the URL. I know it doesn't have to work this way, but for our purpose this works best. In case the old URL had any links to it, I wanted to see if there was an way to automatically update an htaccess file with a 301 redirect from the old URL to the new one. Could anyone point me in the right direction of how to do this? Perhaps a sample script. I've done a lot of searches on Google and can't seem to find anything. e.g. Original:
Technical SEO | | bimmer540
Name: XYZ Widgets
URL: website.com/xyz-widgets New - business changes their company name in their profile:
Name: XYZ Widgets, Inc.
URL: website.com/xyz-widgets-inc Upon the user saving the changes in their profile, I'd like to write a 301 redirect to an htaccess file:
Redirect 301 /xyz-widgets http://www.website.com/xyz-widgets-inc I know how to manually write redirects and I've got a pretty smart web developer. We've just never triggered a script to automatically write to an htaccess file before. Is this possible? Any resources are appreciated. Any security risks? Thanks!0 -
Should I change a 301 redirect?
I recently moved all the content from an old site to a new site on a new domain. I lost a significant amount of traffic as a result. There are 301 redirects for every page on the old site. Generally, these point to the same content as was on the relevant page of the old site. However, the 301 redirect for the homepage on the old site points to the homepage on the new site, not to the content from the old site homepage. I'm wondering whether to change the 301 to point at the content from the old site homepage. Any advice would be much appreciated.
Technical SEO | | seqal0 -
301 Redirect & re-use
I have an old site which is being moved to a new tld due to re-branding. I understand I would do a series of 301 redirects from the pages of the old site to capture the authority and move to the new site. However, at some point in the future (probably 1-2 years) we may want to re-use the old site again for a different brand (it has a good brand, just not for what we're going after). Question is - can a redirected site be re-used at some point in the future? And if so, which site would new authority (links, etc.) go to?
Technical SEO | | uwaim20120 -
I think I'm stuck in a 301 redirect loop
Hi all, I'm trying to correct some of my duplicate content errors. The site is built on Miva Merchant and the storefront page, /SFNT.html, needs to be permanently redirected to www.mydomain.com This is what my .htaccess file looks like: #RedirectPermanent /index.html http://dev.mydomain.com/mm5/merchant.mvc? RewriteEngine On RewriteCond %{HTTP_HOST} !^dev.mydomain.com$ [NC] RewriteRule ^(.*) http://dev.emydomain.com/$1 [L,R=301] DirectoryIndex index.html index.htm index.php /mm5/merchant.mvc redirect 301 /SFNT.html http://dev.mydomain.com/ RewriteCond %{QUERY_STRING} Screen=SFNT&Store_Code=MYSTORECODE [NC] When I use this code and navigate to http://dev.mydomain.com/SFNT.html the URL gets rewritten as http://dev.mydomain.com/?Screen=SFNT So I believe this is what's called a "redirect loop".... Can anyone provide any insight? I'm not a developer, but have been tasked with cleaning up the problems on the website and can use any input anyone is willing to offer. Thanks, jr
Technical SEO | | Technical_Contact0