Www vs no-www duplicate fix?
-
Hi all, I have more or less published two versions of our site. One on "www" and one without. And of course we uncovered it during our SEO crawl as "duplicate" content/titles. My guess (hope) is this is something that can be easily fixed on the server side, but I don't have a lot of knowledge around it. Does anyone know?
-
-
One more follow up - what about for an IIS server?
-
This will make it non www. If you want it to default to www use this:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain.com [NC]
RewriteRule (.*) http://www.domain.com/$1 [L,R=301] -
Quick question on this - will this code set it sobe setting it so the url will read the "www" or without?
-
Thank you both for your responses! I was hoping it would be something as simple as this.
Best,
Becky
-
also go into Google Webmaster tools and set the www preference under configuration
-
Easy fix:
in your .htaccess file, use this
RewriteEngine On RewriteCond %{HTTP_HOST} !^domain\.com RewriteRule (.*) http://domain.com/$1 [R=301,L] Remember to replace domain.com with your domain name. Enjoy!
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
-
Pages with Duplicate Content
When I crawl my site through moz, it shows lots of Pages with Duplicate Content. The thing is all that pages are pagination pages. How should I solve this issue?
Technical SEO | | 100offdeal0 -
Best Practice for www and non www
How is the best way to handle all the different variations of a website in terms of www | non www | http | https? In Google Search Console, I have all 4 versions and I have selected a preference. In Open Site Explorer I can see that the www and non www versions are treated differently with one group of links pointing to each version of the same page. This gives a different PA score. eg. http://mydomain.com DA 25 PA 35 http://www.mydomain.com DA 19 PA 21 Each version of the home page having it's only set of links and scores. Should I try and "consolidate" all the scores into one page? Should I set up redirects to my preferred version of the website? Thanks in advance
Technical SEO | | I.AM.Strategist0 -
404 vs 410 vs 301
Hi guys, I am managing a real estate website, and obviously we have a LOT of pages detailing each property. As those properties get sold and removed from the website, I'm wondering how best to handle this - I know 404, 410 and 301's are all valid ways to go, but I want to provide the best UX combined with the best SEO effect. My thinking is to customise a 410 page to show the page has been permanently removed, and has a relevant message (rather than a generic 404 message) and shows a search box - possibly pre-populated according to the page they were looking for.
Technical SEO | | LoonyToons
I think this gives a good UX and helps Google to understand the importance of the 000's of pages on our website.
I'd also like to clear property detail 404's as quick as possible to make it easier to see if we have problems elsewhere on the site. Having explained this to our development/SEO agency, they are strongly pushing for 301 redirects or leave as 404.
I think 301's would be the worst for UX, and as explained earlier, the volume of 404's is massive and makes it difficult to see real errors. They seem to think this is a better UX and better for SEO. Just wondering what you guys would recommend?0 -
If I want clean up my URLs and take the "www.site.com/page.html" and make it "www.site.com/page" do I need a redirect?
If I want clean up my URLs and take the "www.site.com/page.html" and make it "www.site.com/page" do I need a redirect? If this scenario requires a 301 redirect no matter what, I might as well update the URL to be a little more keyword rich for the page while I'm at it. However, since these pages are ranking well I'd rather not lose any authority in the process and keep the URL just stripped of the ".html" (if that's possible). Thanks for you help! [edited for formatting]
Technical SEO | | Booj0 -
Shopify duplicate content issue
We recently moved out site to shopify but now have a duplicate content issue as we have the same products in different collections. I have added canonical code to get rid of this but my webmaster tools still shows hundreds of duplicate pages. How can I tell if the code I added is working? How long will it take for google to recognise this and drop the duplicates from their index and is this likely to have a significant impact on SERPS? Our we page is www.devoted2vintage.co.uk. Thanks Paul
Technical SEO | | devoted2vintage1 -
Dealing with duplicate content
Manufacturer product website (product.com) has an associated direct online store (buyproduct.com). the online store has much duplicate content such as product detail pages and key article pages such as technical/scientific data is duplicated on both sites. What are some ways to lessen the duplicate content here? product.com ranks #1 for several key keywords so penalties can't be too bad and buyproduct.com is moving its way up the SERPS for similar terms. Ideally I'd like to combine the sites into one, but not in the budget right away. Any thoughts?
Technical SEO | | Timmmmy0 -
Duplicate titles Question
Hi eveyone, I have around 1000 duplicate titles and meta description. The poblem was that I had pages in my home page and different pages had the same title. For example, index.php/site/articles/should_you_eat_protein_every_2-3_hours_for_muscle_growth/ /index.php/site/articles/should_you_eat_protein_every_2-3_hours_for_muscle_growth/N12//index.php/site/articles/should_you_eat_protein_every_2-3_hours_for_muscle_growth/N1444//index.php/site/articles/should_you_eat_protein_every_2-3_hours_for_muscle_growth/N1448//index.php/site/articles/should_you_eat_protein_every_2-3_hours_for_muscle_growth/N1448/P6//index.php/site/articles/should_you_eat_protein_every_2-3_hours_for_muscle_growth/N1452/I have 172 of the same page!So I took off all the pagination on my home page and just added 'click fo more'. When they click more, it takes them to the category.So my question is will google slowly start deleting or non-indexing these duplicate titles or pages as I have removed it from my website? (Just so that you know I added a canonical link and figuring out how to add page numbers to met titles and meta description tags for categories with pages)
Technical SEO | | anoopbal0 -
Duplicate content
I am getting flagged for duplicate content, SEOmoz is flagging the following as duplicate: www.adgenerator.co.uk/ www.adgenerator.co.uk/index.asp These are obviously meant to be the same path so what measures do I take to let the SE's know that these are to be considered the same page. I have used the canonical meta tag on the Index.asp page.
Technical SEO | | IPIM0