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
-
How to handle sorting, filtering, and pagination in ecommerce? Canonical is enough?
Hello, after reading various articles and watching several videos I'm still not sure how to handle faceted navigation (sorting/filtering) and pagination on my ecommerce site. Current indexation status: The number of "real" pages (from my sitemap) - 2.000 pages Google Search Console (Valid) - 8.000 pages Google Search Console (Excluded) - 44.000 pages Additional info: Vast majority of those 50k additional pages (44 + 8 - 2) are pages created by sorting, filtering and pagination. Example of how the URL changes while applying filters/sorting: example.com/category --> example.com/category/1/default/1/pricefrom/100 Every additional page is canonicalized properly, yet as you can see 6k is still indexed. When I enter site:example.com/category in Google it returns at least several results (in most of the cases the main page is on the 1st position). In Google Analytics I can see than ~1.5% of Google traffic comes to the sorted/filtered pages. The number of pages indexed daily (from GSC stats) - 3.000 And so I have a few questions: Is it ok to have those additional pages indexed or will the "real" pages rank higher if those additional would not be indexed? If it's better not to have them indexed should I add "noindex" to sorting/filtering links or add eg. Disallow: /default/ in robots.txt? Or perhaps add "noindex, nofollow" to the links? Google would have then 50k pages less to crawl but perhaps it'd somehow impact my rankings in a negative way? As sorting/filtering is not based on URL parameters I can't add it in GSC. Is there another way of doing that for this filtering/sorting url structure? Thanks in advance, Andrew
Intermediate & Advanced SEO | | thpchlk0 -
How to solve our duplicate content issue? (Possible Session ID problem)
Hi there, We've recently took on a new developer who has no experience in any technical SEO and we're currently redesigning our site www.mrnutcase.com. Our old developer was up to speed on his SEO and any technical issues we never really had to worry about. I'm using Moz as a tool to go through crawl errors on an ad-hoc basis. I've noticed just now that we're recording a huge amount of duplicate content errors ever since the redesign commenced (amongst other errors)! For example, the following page is duplicated 100s of times: https://www.mrnutcase.com/en-US/designer/?CaseID=1128599&CollageID=21&ProductValue=2293 https://www.mrnutcase.com/en-US/designer/?CaseID=1128735&CollageID=21&ProductValue=3387 https://www.mrnutcase.com/en-GB/designer/?CaseID=1128510&CollageID=21&ProductValue=3364 https://www.mrnutcase.com/en-GB/designer/?CaseID=1128511&CollageID=21&ProductValue=3363 etc etc. Does anyone know how I should be dealing with this problem? And is this something that needs to be fixed urgently? This problem has never happened before so i'm hoping it's an easy enough fix. Look forward to your responses and greatly appreciate the help. Many thanks, Danny
Intermediate & Advanced SEO | | DannyNutcase0 -
Review site using canonical tag in a puzzling way.
Have just been looking at a review site and they're using the canonical tag very strangely, to me. For example, they may have several pages of reviews of the same item - they use the canonical tag on page 2/3/4 to point back at page 1 - and yet there is no duplication between the pages. Any idea why they might be doing this?
Intermediate & Advanced SEO | | McTaggart0 -
Rel=prev/next and canonical tags on paginated pages?
Hi there, I'm using rel="prev" and rel="next" on paginated category pages. On 1st page I'm also setting a canonical tag, since that page happens to get hits to an URL with parameters. The site also uses mobile version of pages on a subdomain. Here's what markup the 1st desktop page has: Here's what markup the 2nd desktop page has: Here's what markup the 1st MOBILE page has: Here's what markup the 2nd MOBILE page has: Questions: 1. On desktop pages starting from page 2 to page X, if these pages get traffic to their versions with parameters, will I'll have duplicate issues or the canonical tag on 1st page makes me safe? 2. Should I use canonical tags on mobile pages starting from page 2 to page X? Are there any better solutions of avoiding duplicate content issues?
Intermediate & Advanced SEO | | poiseo1 -
Ecommerce: remove duplicate product pages or use rel=canonical
Say we have a white-widget that is in our white widget collection and also in our wedding widget collection. Currently, we have 3 different URLs for that product (white-widgets/white-widget and wedding-widgets/white-widget and all-widgets/white-widget).We are automatically generating a rel=canonical tag for those individual collection product pages that canonical the original product page (/all-widgets/white-widget). This guide says that is the structure Zappos uses and says "There is an elegance to this approach. However, I would re-visit it today in light of changes in the SEO world."
Intermediate & Advanced SEO | | birchlore
I noticed that Zappos, and many other shops now actually just link back to the parent product page (e.g. If I am in wedding widget section and click on the widget, I go to all-products/white-widget instead of wedding-widgets/white-widget).So my question is:Should we even have these individual product URLs or just get rid of them altogether? My original thought was that it would help SEO for search term "white wedding widget" to have a product URL wedding-widget/white-widget but we won't even be taking advantage of that by using rel=canonical anyway.0 -
I had most of my sites down for a month for technical problems, how do I recover my SEO status ?
I had most of my sites down for a month for technical problems, how do I recover my SEO status ? I did everything possible to not get offline, but I did, some months before my domais were extremely slow, leading to failures over failures. I got them down and moved to another host. What should I do in SEO know that the mess is done ?
Intermediate & Advanced SEO | | aamato0 -
What problems could arise from updating php version?
i havent really gotten a straight answer yet for this question - my client says: "The developers are skeptical about the possibility to update PHP on our server as this could seriously damage the entire RV site functionality." since i know nothing about php and any potential hazards i have to ask the community to see if there is any validity to these concerns. we cant update our version of WP unless the version of php is first upgraded from 5.1.6 to 5.2.4 client wont do this because developers say its a potential nightmare i , as seo, want a current updated version of WP for many obvious reasons can anyone please tell me what, if any, problems could arise from upgrading the sites php? or is it just a lot of work and the developers are making excuses because they dont want to do it? thanks very much to whoever answers
Intermediate & Advanced SEO | | Ezpro92 -
Canonical Related question
I have a site where we have search and result pages, google webmaster tool was giving me duplicate content error for page 1 / 2 / 3 etc etc so i have added canonical on these pages like http://www.business2sell.com/businesses/california/ Is this is correct way of using canonical ?
Intermediate & Advanced SEO | | manish_khanna0