Redundant Hostnames Issue in GA
-
I noticed another post on this, but I have another question. I am getting this message from Analytics:
Property http://www.example.com is receiving data from redundant hostnames. Consider setting up a 301 redirect on your website, or make a search and replace filter that strips "www." from hostnames. Examples of redundant hostnames: example.com, www.example.com.
We don't have a 301 in place that manages this and I am quite concerned about handling that the right way. We do have a canonical on our homepage that says:
rel="canonical" href="http://www.example.com/" /> I asked on another site how to safely set up our 301 and I got this response:
RewriteCond %{HTTP_HOST} !^www.example.com$ [NC]
RewriteRule ^ http://www.example.com%{REQUEST_URI} [R=301,L,NE]Is this the best way of handling it? Are there situations where this would not be the best way?
We do have a few subdomains like beta.example.com in use and have a rather large site, so I just want to make sure I get it right.
Thanks for your help!
Craig
-
Rewrites are generally regarded as the best way to handle this kind of redirect, but your DNS provider likely has their own redirect system in place that can implement the same functionality without modifying your site's .htaccess. Same result, different technique.
The reason I use my DNS with a "www" subdomain record to forward to my non-www domain is because WordPress sometimes has issues with using RewriteRule. It seems to break permalinks. I always just set it once with my DNS host and never think about it again.
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
-
403 Errors Issue
Hi, all! I've been working with a Wordpress site that I inherited that gets little to no organic traffic, despite being content rich, optimized, etc. I know there's something wrong on the backend but can't find a satisfactory culprit. When I emulate googlebot, most pages give me a 403 error. Also, google will not index many urls which makes sense and is a massive headache. All advice appreciated! The site is https://www.diamondit.pro/ It is specific to WP Engine, using GES (Global Edge Security) and WPWAF
Technical SEO | | SimpleSearch0 -
Google Appending Blog URL inbetween my homepage and product page is it issue with base url?
Hi All, Google Appending Blog URL inbetween my homepage and product page. Is it issue or base url or relative url? Can you pls guide me? Looking to both tiny url you will get my point what i am saying. Please help Thanks!
Technical SEO | | amu1230 -
Crawl Issues / Partial Fetch Via Google
We recently launched a new site that doesn't have any ads, but in Webmaster Tools under "Fetch as Google" under the rendering of the page I see: Googlebot couldn't get all resources for this page. Here's a list: URL Type Reason Severity https://static.doubleclick.net/instream/ad_status.js Script Blocked Low robots.txt https://googleads.g.doubleclick.net/pagead/id AJAX Blocked Low robots.txt Not sure where that would be coming from as we don't have any ads running on our site? Also, it's stating the the fetch is a "partial" fetch. Any insight is appreciated.
Technical SEO | | vikasnwu0 -
Structure Data Issue
HiI found few errors in Google webmaster tools under structure data. The error shows "Missing: name' but when I click 'Test Live Data' it shows 'All good'. Currently we are using Drupal CMS and please find attached error screenshot.Please advice on this issue.Thanks,SatlaqlGEyp7
Technical SEO | | TrulyTravel0 -
Responsive Code Creating Duplicate Content Issue
Good morning, Our developers have recently created a new site for our agency. The site is responsive for mobile/tablets. I've just put the site through Screaming Frog and I've been informed of duplicate H2s. When I've looked at some of the page sources, there are some instances of duplicated H2s and duplicated content. These duplicates don't actually appear on the site, only in the code. When I asked the development guys about this, they advised this is duplicated because of the code for the responsive site. Will the site be negatively affected because of this? Not everything is duplicated, which leads me to believe it probably could have been designed better... but I'm no developer so don't know for sure. I've checked the code for other responsive sites and no duplicates can be found. Thanks in advance, Lewis
Technical SEO | | PeaSoupDigital0 -
Disavow Issues
Hi We have a client who was hit by Penguin about 18 months ago. We disavowed all the bad links about 10 months ago however this has not resulted in an uplift in traffic or rankings. The client is asking me whether it would be better to dump the domain and move the website to a fresh domain. Can you provide thoughts / experience on this please? Thanks.
Technical SEO | | EffectiveSEOUK0 -
Pagination Issue
Hello Community, We have a pagination issue on a set of pages : http://homengo.com/s/location/ http://homengo.com/s/location/?page=1 and so on ( ?page=2, ?page=3, ...). As you can see in the source code the pagination rel and prev are there. First question : does moz crawler know and recognize pagination ? Second question : if yes then do you know what could be wrong with pagination on these pages ? Thanks
Technical SEO | | seomengo0 -
Duplicate Homepage issue
SEOMOZ says my site has two homepages: www.mysite.com www.mysite.com/ When you go to "www.mysite.com/" the URL changes to "www.mysite.com" Why is this happening and what can I do about it?
Technical SEO | | LucasF0