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
-
National services provider and localized SEO (no physical stores)
Doing work for a telecom provider who operates in over 25 states. They are not trying to drive traffic to their brick-and-mortar stores. They want their marketing website to show products/services/pricing dynamically when a user enters their zip code. Previously, we could not show this until the shopper was already in the purchase flow that began with their serviceable address. They want to move these location-based details more forward in the shopping experience. They would likely have a "default" zip and set of services/pricing displaying until a user changes their location. My question is how does Google treat local SEO on a site where all location-targeted content is dynamic? Will the website suffer in localized search, when a shopper, say, in Colorado, wants to search for Internet providers? Is it better to have distinct landing pages for each territory with services/pricing?
Local SEO | | sprydigital0 -
Is page speed important to improve SEO ranking?
I saw on a SEO Agency's site (https://burstdgtl.com/search-engine-optimization/) that page speed apparently affects Google ranking. Is this true? And if it is, how do I improve it, do I need an agency?
On-Page Optimization | | jasparcj0 -
How to stop /tag creating duplicate content - Wordpress
Hi, I keep getting alert for duplicate content. It seems Wordpress is creating it through a /tag https://www.curveball-media.co.uk/tag/cipr/ https://www.curveball-media.co.uk/tag/pr-agencies/ Something in the way we've got Wordpress set up?
Technical SEO | | curveballmedia0 -
Why is my inner pages ranking higher than main page?
Hi everyone, for some reason lately i have discovered that Google is ranking my inner pages higher than the main subfolder page. www.domain.com/subfolder --> Target page to be ranked
Technical SEO | | davidboh
www.domain.com/subfolder/aboutus ---> page that is currently ranking Also in the SERP most of the time, it is showing both links in this manner. www.domain.com/subfolder/aboutus
-----------www.domain.com/subfolder Thanks in advance.1 -
Redirection chain and Javascript Redirect
Hi, A redirection chain is usually defined as a page redirecting to another page which itself is another redirection. URL1 ---(301/302)---> URL2 ---(301/302)---> URL3 But what about Javascript redirect? They seem to be a different beast: URL1 ---(301/302)---> URL2 ---(200 then Javascript redirect)---> URL3 From what I know if the javascript redirect is instant Google counts it as a 301 permanent redirection, but I'm still not sure about if this counts as a redirection chain. Most of the tools (such as moz) only see the first redirection. So is that scenario a redirection chain or no?
Technical SEO | | LouisPortier0 -
Trailing Slashes and SEO
Hi, We're currently using a third party blog platform (Blog Engine) on our site and we have a trailing slash issue. I can add as many trailing slashes as I want to the blog's homepage URL, but they don't redirect and our dev guys say this cannot be done with Blog Engine. We're in the process of building our own blog but, in the meantime, I just wanted to know if this will cause an issue? Individual blog posts with trailing slashes are redirected, it's just the homepage where it can't be done. I haven't noticed any traffic going to a blog URL with trailing slashes, and I don't believe any URLs with trailing slashes are being indexed, so should this be OK? Cheers, Lewis
Technical SEO | | PeaSoupDigital0 -
Using the Canonical Tag
Hi, I have an issue that can be solve with a canonical tag, but I am not sure yet, we are developing a page full of statistics, like this: www.url.com/stats/ But filled with hundreds of stats, so users can come and select only the stats they want to see and share with their friends, so it becomes like a new page with their slected stats: www.url.com/stats/?id=mystats The problems I see on this is: All pages will be have a part of the content from the main page 1) and many of them will be exactly the same, so: duplicate content. My idea was to add the canonical tag of "www.url.com/stats/" to all pages, similar as how Rand does it here:Â http://www.seomoz.org/blog/canonical-url-tag-the-most-important-advancement-in-seo-practices-since-sitemaps But I am not sure of this solution because the content is not exactly the same, page 2) will only have a part of the content that page 1) has, and in some cases just a very small part. Is the canonical tag useful in this case? Thank you!
Technical SEO | | andresgmontero0