Understanding Redirects and Canonical Tags in SEO: A Complex Case
-
Hi everyone,
nothing serious here, i'm just playing around doing my experiments
but if any1 of you guys understand this chaos and what was the issue here, i'd appreciate if you try to explain it to me.I had a page "Linkaufbau" on my website at https://chriseo.de/linkaufbau.
My .htaccess file contains only basic SEO stuff:
# removed ".html" using htaccess RewriteCond %{THE_REQUEST} ^GET\ (.*)\.html\ HTTP RewriteRule (.*)\.html$ $1 [R=301,L] # internally added .html if necessary RewriteCond %{REQUEST_FILENAME}.html -f RewriteCond %{REQUEST_URI} !/$ RewriteRule (.*) $1\.html [L] # removed "index" from directory index pages RewriteRule (.*)/index$ $1/ [R=301,L] # removed trailing "/" if not a directory RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} /$ RewriteRule (.*)/ $1 [R=301,L] # Here’s the first redirect: RedirectPermanent /index /
My first three questions:
Why do I need this rule? Why must this rule be at the top? Why isn't this handled by mod_rewrite?
Now to the interesting part:
I moved the Linkaufbau page to the SEO folder: https://chriseo.de/seo/linkaufbau and set up the redirect accordingly:
RedirectPermanent /linkaufbau /seo/linkaufbau.html
I deleted the old /linkaufbau page.
I requested indexing for /seo/linkaufbau in the Google Search Console. Once the page was indexed, I set a canonical to the old URL:
<link rel="canonical" href="https://chriseo.de/linkaufbau">
- Then I resubmitted the sitemap and requested indexing for /seo/linkaufbau again, even though it was already indexed.
- Due to the canonical tag, the page quickly disappeared.
- I then requested indexing for /linkaufbau and /linkaufbau.html in GSC (the old, deleted page).
After two days, both URLs were back in the serps::
https://chriseo.de/linkaufbau https://chriseo.de/linkaufbau.html
this is the new page /seo/linkaufbau
This is the old page /linkaufbau
Both URLs are now in the search results and all rankings are significantly better than before for keywords like:
organic linkbuilding linkaufbau kosten linkaufbau service natürlicher linkaufbau hochwertiger linkaufbau organische backlinks linkaufbau strategie linkaufbau agentur
Interestingly, both URLs (with and without .html) redirect to the new URL https://chriseo.de/seo/linkaufbau, which in turn has a canonical pointing to https://chriseo.de/linkaufbau (without .html).
In the SERPs, when https://chriseo.de/linkaufbau is shown, my new, updated snippet is displayed. When /linkaufbau.html is shown, it displays the old, deleted page that had already disappeared from the index.
I have now removed the canonical tag.
I don't fully understand the process of what happened and why. If anyone has any ideas, I would be very grateful.
Best regards,
Chris -
When you move a web page from one URL to another, you use redirects to ensure that users and search engines are directed to the new URL. 301 is a permanent redirect. It tells search engines that the page has permanently moved to a new location. 302 is a temporary redirect. It tells search engines that the move is only temporary, so they should keep the original page indexed. Meta Refresh is a type of redirect that happens on the page level. It's not as SEO-friendly as server-side redirects because it doesn't pass the same level of link equity. Canonical tags are HTML elements that help prevent duplicate content issues by specifying the preferred version of a web page.
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
-
Put a 301 from /main to home page, now I'm panicking
Hi, Our website is 10 years old, but I only noticed last night we had a https://curveball-media.co.uk/main page which has some badly formatted copy on. I redirected (301) to the home page https://curveball-media.co.uk/ Then I had a slight panic that maybe this was the wrong thing to do and it should be like it was with the home page and the /main page. Should I have left it or did I do the right thing?
Intermediate & Advanced SEO | | curveballmedia0 -
Redirect and ranking issue
Hi there - was wondering whether someone might be able to help. For a period of a day and a half, all the traffic to our website's blog articles were mistakenly being redirected to our homepage. A number of these articles ranked in the top 5 in Google worldwide for their targeted keywords, so this was a considerable amount of organic traffic that was instantly being redirected. It was a strange site glitch and our web team rectified the error, but now all these articles have disappeared from Google rankings (not visible anywhere in the first five pages). I'm presuming this must be linked to this redirect issue - we've been advised to wait and see whether Google restores these rankings, but I'm still concerned as to whether this represents a more serious problem? We have re-indexed the pages we are most concerned about, but am not sure whether there is anything else obvious we should think to do. If anyone has any thoughts, I'd be happy to hear them!
Technical SEO | | rwat0 -
Canonical tag in the Michael Torbert SEO plugin
I am confused about a canonical tag that appears in the header section of a site that uses the WordPress All in One SEO plugin by Michael Torbert. That is a very popular one. It says, I thought that telling Google that a page is canonical means "Don't index this one, it is not the primary page." But in fact, this is the primary page because when you go to www.xquisitevents.com it redirects to xquisitevents.com. Is this done properly or not? Ditto for all the other pages, i.e. xquisitevents.com/about-us has a canonical tag in the wordpress plugin, etc. Which is the real primary page? And does the primary page correctly have the canonical tag in the plugin?
Technical SEO | | BridgetGibbons0 -
Two different canonical tags on one page
Due to an error, some of my pages now have two canonical tags on them. One is correct and the other goes to a nonsense URL (404 page). I know I should ideally remove the incorrect ones, but it's a big manual job. Are they doing any harm? Can I just leave them there and let Google figure it out? The correct ones are higher up in the code. Will this make a difference? Any help appreciated.
Technical SEO | | ShearingsGroup0 -
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 -
Image Size for SEO
Hi there I have a website which has some png images on pages, around 300kb - is this too much? How many kbs a page, to what extent do you know does Google care about page load speed? is every kb important, is there a limit? Any advice much appreciated.
Technical SEO | | pauledwards0 -
Canonical tag, CNAME and 301 redirect
I have a website with a couple of domains pointing to one IP address. Let's say I have two domains www.example.com and www.example.ca I also see during my SEO analysis that the example.com and the www.example.com (same for the example.ca and the www.example.ca) are triggering server responses. How do I deal with this issue for best SEO. Canonical links? CNAME, or 301 redirects? thanks
Technical SEO | | casper4340