Please let me know if I am in a right direction with fixing rel="canonical" issue?
-
While doing my website crawl, I keep getting the message that I have tons of duplicated pages.
http://example.com/index.php and http://www.example.com/index.php are considered to be the duplicates. As I figured out this one: http://example.com/index.php is a canonical page, and I should point out this one: http://www.example.com/index.php to it. Could you please let me know if I will do a right thing if I put this piece of code into my index.php file?
? Or I should use this one: -
This type of duplicate applies to far more than just the homepage...so by implementing a single redirect rule, you handle this type of duplicate for every single URL on your site, and neither people nor search engines will ever see the undesired version.
If you do this via canonical tags, you have to include the canonical tag on every page, which could be very time consuming depending on how large your site is.
-
Thank you, will do!
-
Thanks for your reply, Logan. Why exactly 301 redirect is better than handling this with canonical tags? Canonical tags wouldn't take so much time, would they?
-
As Logan said, you'd be better served handling these with 301 redirects. But you will also want to go in Google Search Console/Webmaster tools into Site Settings and set your preferred domain to either WWW on Non-WWW (depending on which you prefer to show across your site).
-
Hi,
Ideally, you would handle www and nonwww duplication by way of a redirect rule. Both versions of that URL should not render, i.e. when you go to www.example.com it should take you straight over to example.com.
You can handle this with canonical tags the way you've proposed, the URL in the href element should be the one you prefer. However, this should be reserved only as a work-around in the event that you can't get implement a server-side redirect rule to handle ALL www-to-nonwww issues.
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 being flagged in Search Console as having a "no-index" tag, do not have a meta robots tag??
Hi, I am running a technical audit on a site which is causing me a few issues. The site is small and awkwardly built using lots of JS, animations and dynamic URL extensions (bit of a nightmare). I can see that it has only 5 pages being indexed in Google despite having over 25 pages submitted to Google via the sitemap in Search Console. The beta Search Console is telling me that there are 23 Urls marked with a 'noindex' tag, however when i go to view the page source and check the code of these pages, there are no meta robots tags at all - I have also checked the robots.txt file. Also, both Screaming Frog and Deep Crawl tools are failing to pick up these urls so i am a bit of a loss about how to find out whats going on. Inevitably i believe the creative agency who built the site had no idea about general website best practice, and that the dynamic url extensions may have something to do with the no-indexing. Any advice on this would be really appreciated. Are there any other ways of no-indexing pages which the dev / creative team might have implemented by accident? - What am i missing here? Thanks,
Technical SEO | | NickG-1230 -
Google displaying "Items 1-9" before the description in the Search Results
We see our pages coming up in Google with the category page/product numbers in front of our descriptions. For example: Items 1 - 24 of 86 (and than the descriptions follows). Our website is magento based. Is there a fix for this that anyone knows of? Is there method of stopping Google from adding this on to the front of our Meta Description?
Technical SEO | | DutchG0 -
I need to know more clearance on rel=canonical usage than 301 redirects ?
Hi all SEOmozs, As we all know purposes of rel=canonical , I have a query to ask that If we don't have any possibility to use 301 redirects on a domain , can it be really right to use rel=canonical on an old domain to let search engine to treat those all pages should be not priority where the domain we are being promoted in the market to list up instead that. I found this interesting Matt Cutts video http://www.youtube.com/watch?v=gJK5Uloy76g where he has told or cleared the point very nicely, yes we can use it if there is no possibility in your older domain or pages. So here i am asking the same to know more detailed clarity on this so that i can be more confidence on it. I have been seeing issues in my domains where old one domain comes than new domain why with new domain contents, and can it be really very good to bring new domain with **rel=canonical without using 301 redirect :
Technical SEO | | Futura
Old : kanin.com (leaving) New : kangarokanin.com (promoting) Where i might have not used yet the rel=canonical in old domain, will be going to use it soon , after finishing this discussion.** Regards,
Teginder Ravi tcSnN.jpg tcSnN.jpg dGd34.jpg0 -
Does the rel="bookmark" tag have any SEO impication?
I'm assuming the rel="bookmark" tag doesn't have any SEO implications but I just wanted to make sure it wasn't viewed like a nofollow by search engines.
Technical SEO | | eli.boda0 -
Rel Canonical Question
I changed /tulsa-cleaning-services/ to /services/ because the URLs were getting too long. Now I'm getting an error for Appropriate use of Rel Canonical. I used a 301 to send old links to the new location. Any ideas? Thanks! Will www.americancarpetclean.com
Technical SEO | | WillWatrous0 -
301 or Rel=canonical
Should I use a 301 redirect for redirect mywebsite.com to www.mywebsite.com or use a rel=canonical?? Thanks!
Technical SEO | | LeslieVS0 -
Is "last modified" time in XML Sitemaps important?
My Tech lead is concerned that his use of a script to generate XML sitemaps for some client sites may be causing negative issues for those sites. His concern centers around the fact that the script generates a sitemap which indicates that every URL page in the site was last modified at the exact same date and time. I have never heard anything to indicate that this might be a problem, but I do know that the sitemaps I generate for other client sites can choose server response or not. What is the best way to generate the sitemap? Last mod from actual time modified, or all set at one date and time?
Technical SEO | | ShaMenz0 -
How rel=canonical works with index, noindex ?
Hello all, I had always wondered how the index,noindex affects to the canonical. And also if the canonical post should be included in the sitemap or not. I posted this http://www.comparativadebancos.co... and with a rel=canonical to this that was published at the beginning of the month http://www.comparativadebancos.co... but then I have the first one in google http://www.google.com/search?aq=f... May be this is evident for you but, what is really doing the canonical? If I publish something with the canonical pointing to another page, will it still be indexed by google but with no penalty for duplicate content? Or the usual behaviour should have been to havent indexed the first post but just the second one? Should I also place a noindex in the first post in addition to the canonical? What am I missing here? thanks
Technical SEO | | antorome0