Canonical Problems
-
Hi Guys, There is so much info out there about canonical issues and 301 redirects I'm not sure what to do about my problem.
Google webmaster says I have over 2000 duplicate page titles. Google is showing most of my pages in duplicate or triplicate url format.
Example:
/store/LOVE_OIL_CARIBBEAN_ROSE//store/LOVE_OIL_CARIBBEAN_ROSE/store/love_oil_caribbean_rose/Im using x-cart pro as my cart.When I look at the source code I see each one having a rel=canonical tag with the exact urls you see above. Can someone give me an example of a redirect that I can put in my .htaccess file that would work site wide?I obviously cant go through and 301 this on a page by page basis. It would take a year.Thank You Tim
-
I am sure you can find the expressing via a Google search, but even easier you can ask your host to do it for you. Most small sites use managed hosting, and most hosts are willing to help. Give them a call or open a help ticket and ask.
-
Thanks Ryan, Funny I never realized that about windows vs. linux. That is very helpful. Now I just need the proper regex expressions. We have tried several in the past and have taken the site down in the process. I think its funny that with all of google technology they still cant determine that a page is a page.
-
Hi Tim.
A few suggestions:
1. ALWAYS use lower case in URLs. 100% always, never break this rule.
Many of us are used to working with Windows where case sensitivity does not matter. Windows offers a character map to basically say the upper case and lower case versions of a letter are equivalent. On a Linux server (which is what most sites run off of) a lower case and upper case letter are two distinct characters.
2. Make a determination of how your web page URL structure will appear and be consistent. I prefer to use a trailing slash "/" to indicate a folder which contains additional pages, and no trailing slash to indicate a web page (i.e. you can't drill down any deeper). mysite.com/page1 <> mysite.com/page1/ These are two distinct URLs.
Can someone give me an example of a redirect that I can put in my .htaccess file that would work site wide?
You are looking for two regex expressions. I am not a regex expert but one expression should remove the trailing slash from any web pages and 301 them to their no-slash equivalent. The second expression I believe uses the NC qualifier to disregard the case sensitivity of the page.
Going forward, try to follow the rules for #1/2 when creating URLs.
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
-
An article that is part of a larger content: canonical, noindex or nothing?
Hi everyone! I have a big and complete content about something and my team did a new post with part of this content (to send to prospects and use in email automation). Which one is my best option: Canonical from the post to the complete (and oldest) content - thats my personal choice Noindex in the new post Remove this part from de big and complete content (and put a link to the new content) Do nothing Other option (tell me please) PS: Both contents are ranking for the same keyword, but Search Console dont present issue like duplicate content Best regards!
Intermediate & Advanced SEO | | Ewerton.RD0 -
Big problems with site traffic
Hello! I have big problems with website promotion. It's been 7 months and the attendance on the site is 1-5 people a day. I do not understand the reason. Can you tell me what I'm doing wrong? Site: www.azartlist.com Many thanks.
Intermediate & Advanced SEO | | Bobic1 -
Is it possible that Google would disregard canonical tag?
Hi all, I was wondering if it is possible for Google to diregard the canonical tag, if for example they decide it is wrongly put based on behavioural data. On the Natviscript Blog's individual blog posts there is a canonical tag for the www.nativescript.org/blog/details (printscreen - http://prntscr.com/e8kz5k). In my opinion it should not be there, and I've put request to our Engineering team for removal some time ago. Interestingly, all blog posts are indexed and got decent amount of organic traffic despite the tag. What do you think? Could it be that Google would disregard the tag based on usage data from let's say GA? Thanks, Lily
Intermediate & Advanced SEO | | lgrozeva0 -
Canonical tags for duplicate listings
Hi there, We are restructuring a website. The website originally lists jobs that will have duplicate content. We have tried to ask the client not to use duplicates but apparently their industry is not something they can control. The recommendations I had is to have categories (which will have the idea description for a group of jobs), and the job listing pages. The job listing pages will then have canonical tags pointing to the category page as the primary URL to be indexed. Another opinion came from a third party that this can be seen as if we are tricking Google and would get penalised, **Is that even true? **Why would Google penalise for this if thats their recommendations in the first place? This third party suggested using nofollow on the links to these listings, or even not not index them all together. What are your thoughts? Thanks Issa
Intermediate & Advanced SEO | | iQi0 -
Canonical vs 301 - Web Development
So I'm having a conversation with the development team at my work and I'm a little tired today so I thought I would ask for other opinions. The currently the site duplicates it's full site by having a 200 show with or without a trailing slash. I have asked for a 301 redirect to with the trailing slash. They countered with having all the rel=canonical be the trailing slash, which I know is acceptable. My issue is that while a rel=canonical is acceptable, since my site has a very high level of competition and a very aggressive link building strategy, I believe that it may be beneficial to have the 301 redirect. BUT, I may be wrong. When we're talking hundreds of thousands of links, I would love to have them directly linked instead of possibly splitting them up between a duplicate page that has a correct canonical. I'm curious to what everyone thinks though....
Intermediate & Advanced SEO | | mattdinbrooklyn1 -
Appropriate use of rel canonical
Hey Guys,I'm a bit stuck. My on-page grade indicated the following two issues and I need to find how how to fix both issues.If you have a solution, could you please let me know how to address these issues? It's all a bit intimidating at the moment!!Thank you so much..****************************************************************************************************************************************Appropriate Use of Rel Canonical If the canonical tag is pointing to a different URL, engines will not count this page as the reference resource and thus, it won't have an opportunity to rank. Make sure you're targeting the right page (if this isn't it, you can reset the target above) and then change the canonical tag to reference that URL. Recommendation: We check to make sure that IF you use canonical URL tags, it points to the right page. If the canonical tag points to a different URL, engines will not count this page as the reference resource and thus, it won't have an opportunity to rank. If you've not made this page the rel=canonical target, change the reference to this URL. NOTE: For pages not employing canonical URL tags, this factor does not apply. No More Than One Canonical URL Tag The canonical URL tag is meant to be employed only a single time on an individual URL (much like the title element or meta description). To ensure the search engines properly parse the canonical source, employ only a single version of this tag. Recommendation: Remove all but a single canonical URL tag
Intermediate & Advanced SEO | | StoryScout1 -
Confusing 301 / Canonical Redirect Issue - Wizard Needed
I had two pages on my site with identical content. What I did was 301 redirect one page to the other. I also added canonical redirect code to the page that held the 301 code. Here is what I have: www.careersinmusic.com/music-colleges.aspx - this page was a duplicate and I needed it to resolve to:
Intermediate & Advanced SEO | | 4Buck
www.careersinmusic.com/music-schools.aspx Here is the code I used: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX music-colleges.aspx
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="music-colleges.aspx.vb" Inherits="music_colleges" %>
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
http://www.w3.org/1999/xhtml"> http://www.careersinmusic.com/music-schools.aspx"/> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
music-colleges.aspx.vb
Partial Class music_colleges
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Response.Status = "301 Moved Permanently"
Response.AddHeader("Location", "http://www.careersinmusic.com/music-schools.aspx")
End Sub
End Class XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX The problem:
For some reason, when the search “music colleges” is done in Google, I am #7. When the term “music schools” is done, I am around 119. I MUST be getting a penalty for some reason, I just cannot figure the reason. When perform well for one term and terrible for the next? All I can come up with is a duplicate content penalty or something along those lines. Also, music-colleges.aspx seems to still be in Googles index, even though the above 301 happened months ago. Thoughts? site:www.careersinmusic.com/music-colleges.aspx Any insight into this would be GREATLY appreciated. Many Thanks!0 -
Help with canonical tag
hello- i got this recommendation <dl> <dt>Recommendation</dt> <dd>Add a canonical URL tag referencing this URL to the header of the page</dd> <dd>from my "report card" and i see also that i have a lot of issues with duplicate content but i really dont have any duplicate content on my site.</dd> <dd>the crawl has apparently marked every post in my blog as duplicate page content.</dd> <dd>and the "use canonical tag" suggestion keeps appearing as a fix to my problems.</dd> <dd>could you please help me with ------How do i create a canonical tag?</dd> <dd>is it just rel=canonical?</dd> <dd>and where do i put it?</dd> <dd>i should put it on every page right?</dd> <dd>or with CSS my webmaster could probably do it very quickly right?</dd> <dd>i get the basic concept behind rel=canonical but i cant say i fully understand it -</dd> <dd>i need some help with regard to how and where this tag should be placed.</dd> <dd>thanks,</dd> <dd>erik
Intermediate & Advanced SEO | | Ezpro9
</dd> <dd>.</dd> </dl>0