Canonicalization issue I cant work out
-
Seo Moz have kindly brought to my attention some canonicalization issues with my site.
Firstly I've adjust http://capitalalist.com to 301 redirect to http://www.capitalalist.com via htaccess.
But the crawl has shown for every page in my site the problem below:
http://www.capitalalist.com/cirque-du-soir
http://www.capitalalist.com/cirque-du-soir/
It's just that last / that's causing the problem. But I can't seem to see anyone having the same issue before.
BTW im using wordpress if that makes a difference.
Can anyone elaborate on the issue? How would i adjust my htaccess file to redirect a request with a / on the end of it?
Thanks in advance!
-
Thanks Jassy.
Exactly what i was looking for.
Good stuff!
-
Hi Paul, try something like this, but there are many variations of these on the web.
Posted this just as the yoast post was coming on.
#add trailing slash
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(.[a-zA-Z0-9]{1,5}|/)$
RewriteRule (.*)([^/])$ http://www.capitalist.com/$1$2/ [R=301,L]add www for non www pages
RewriteCond %{HTTP_HOST} ^capitalist.com$ [NC]
RewriteRule ^(.*)$ http://www.capitalist.com/$1 [L,R=301] -
The good folks at Yoast created a Wordpress plugin to deal with this very issue:
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 excluded from Google's index due to "different canonicalization than user"
Hi MOZ community, A few weeks ago we noticed a complete collapse in traffic on some of our pages (7 out of around 150 blog posts in question). We were able to confirm that those pages disappeared for good from Google's index at the end of January '18, they were still findable via all other major search engines. Using Google's Search Console (previously Webmastertools) we found the unindexed URLs in the list of pages being excluded because "Google chose different canonical than user". Content-wise, the page that Google falsely determines as canonical instead has little to no similarity to the pages it thereby excludes from the index. False canonicalization About our setup: We are a SPA, delivering our pages pre-rendered, each with an (empty) rel=canonical tag in the HTTP header that's then dynamically filled with a self-referential link to the pages own URL via Javascript. This seemed and seems to work fine for 99% of our pages but happens to fail for one of our top performing ones (which is why the hassle 😉 ). What we tried so far: going through every step of this handy guide: https://moz.com/blog/panic-stations-how-to-handle-an-important-page-disappearing-from-google-case-study --> inconclusive (healthy pages, no penalties etc.) manually requesting re-indexation via Search Console --> immediately brought back some pages, others shortly re-appeared in the index then got kicked again for the aforementioned reasons checking other search engines --> pages are only gone from Google, can still be found via Bing, DuckDuckGo and other search engines Questions to you: How does the Googlebot operate with Javascript and does anybody know if their setup has changed in that respect around the end of January? Could you think of any other reason to cause the behavior described above? Eternally thankful for any help! ldWB9
Intermediate & Advanced SEO | | SvenRi1 -
DeepCrawl Calls Incomplete Open Graph Tags and Missing Twitter Cards An Issue. How important is this?
Hi, Let me first say that I really like the tool DeepCrawl. So, not busting on them. More like I'm interested in the relative importance of two items they call as "Issues." Those items are "Incomplete Open Graph Tags" and "No Valid Twitter Cards." They call this out on every page. To define it a bit further, I'm interested in the importance as it relates to organic search.I'm also interested in there's some basic functionality we may have missed in our Share42 implementation. To me, it looks like the social sharing buttons work. Also, we use Share42 social sharing buttons, which are quite functional. If it would help, I could private message you an example url. Thanks! Best... Mike
Intermediate & Advanced SEO | | 945011 -
How to work with schema.org together with Wordpress
Hi schema.org seems to be quite simple when working with a plain HTML website. You just look up the code you need on schame.org and implement it in the HTML file as required. But when using Wordpress things become more complicated. I have to use plugins for schemata and then I can only use the schemata that exist in those plugins which are very limited. How do you deal with this issue? Cheers Marc
Intermediate & Advanced SEO | | RWW1 -
XML Sitemap works fine in GWT, but does not show in SERP
XML Sitemap works properly in GWT, but when I run a search in Google for "site:example.com/sitemap.xml" it does not show. However, my XML image sitemap show when I run the same search in Google. Is this potentially an issue on my end and is there a solution?
Intermediate & Advanced SEO | | khi50 -
GWT url parameter issue/question
Hi Moz community, I'm having an issue with URL parameters in GWT. The tracking taxonomy for my websites is used as either /?izid=... (internal) OR /?dzid=... (external) I put tracking parameters in GWT as izid & dzid, but it hasn't picked up any URLs or examples in regards to these parameters. It's been about 2 months since we've started using this so I want to make sure Google isn't indexing as duplicate content. Side note: any page that uses a tracking parameter automatically adds rel="canonical" to the original page. Could this be the reason that GWT doesn't pick up any URLs for tracking parameters and/or do I not need to worry about adding paramters if I already have the canonical attribute automatically in place. Thanks for your help,
Intermediate & Advanced SEO | | IceIcebaby
-Reed0 -
JavaScript Issue? Google not indexing a microsite
We have a microsite that was created on our domain but is not linked to from ANYwhere EXCEPT within some Javascript elements on pages on our site. The link is in one JQuery slide panel. The microsite is not being indexed at all - when i do site:(microsite name) on Google, it doesn't return anything. I think it's because the link's only in a Java element, but my client assures me that if I submit to Google for crawling the problem will be solved. Maybe so, but my point is that if you just create a simple HTML link from at least one of our site pages, it will get indexed no problem. The microsite has been up for months and it's still not being indexed - another newer microsite that's been up for a few weeks and has simple links to it from our pages is indexing fine. I have submitted the URL for crawling but had to use the google.com/webmasters/tools/submit-url/ method as I don't have access to the top level domain WMT account. p.s. when we put the microsite URL into the SEOBook spider-test tool it returns lots of lovely information - but that just tells me the page is findable, does exist, right? That doesn't mean Google's going to necessarily index it, as I am surmising...Moz hasn't found in the 5 months the microsite has been up and running. What's going on here?
Intermediate & Advanced SEO | | Jen_Floyd0 -
Link exchanges of specific blogs work if relevant?
Hello, I've always wondered if I have a tech blog and wrote about "why Droid phones are better than Iphones", i would need more links pointed to my specific blog. Doing so, i find another blog that's reputable with high domain authority that talks about the SAME blog/subject. Is it wise and good for SEO if i contact the blogger and have each other reference each other's blog with the anchor text link as the brand name in our respective blogs? It's a typical link exchange, but this is more niche. Would this help my efforts? And would Google accept our good faith linking to a great article vice versa. Thanks, Shawn
Intermediate & Advanced SEO | | Shawn1240 -
Changing keyword target on home page? Will it work?
I have a site that is in the financial services niche and has around 20 pages talking about different services. I want to change the goal of the site and now just target Insurance. The current home page is a simple introduction to the website, I was going to change this to target the insurance keyword and put around 500 words content on the front page. I was also going to change the Page Title, Description and H1 tags too. My question is will the front page then rank for that keyword once google recrawls the site? Could I damage the PR of the site or any other factors from changing the front page. Here are some stats about the site 11 years old PR 3 Page Mozrank 5.58 Page Moztrust 5.61 Domain Mozrank 2.29 Domain Moztrust 3.17 Thanks for your help guys
Intermediate & Advanced SEO | | JohnPeters0