Canonical Tag Function
-
cbartman0145
-
Topic Author
-
Offline
-
New Member
-
Less
More
-
Posts: 2
-
Thank you received: 0
-
-
10 years 6 months ago #2409
by cbartman0145
So my company told me that we need to host a duplicate company site and (get rid of the 301 redirects) and host the site in Germany under a .de domain. My question is should I add a canonical tag on every page on the .de tag meta? and if so, what do I place in the menu. Currently I am pacing the URL of the page that has the same content as the .de site. Your help is greatly appreciated! Attached explains a little more. I apologize if this question has been asked a lot..
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
10 years 6 months ago #2413
by admin
Hi,
you could create a rule to add the right canonical (same URL just domain extension different) to each page. Try this:
URL: .*
Canonical: http://<domain.de>{path}{query}
Request only: true (checked)
Last rule: false (unchecked)
Kind regards,
Luigi
Please Log in or Create an account to join the conversation.
-
cbartman0145
-
Topic Author
-
Offline
-
New Member
-
Less
More
-
Posts: 2
-
Thank you received: 0
-
-
10 years 6 months ago #2418
by cbartman0145
So, just entering the URL on the Tag Meta plugin of the webpage for which that webpage is copied from won't do the trick? I only see one menu line for which to add the canonicol link. Please see attachment in initial post.
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
10 years 6 months ago #2419
by admin
Hi,
the canonical is a single field but the value is calculated dynamically thanks to macros {path} and {query}, and the field URL can matches partially with an URL or can be a regular expression. This is the real power of Tag Meta. But I made a little mistake in the rule. Let's assume you create this rule on the .de site:
URL: .*
Canonical: http://www.yourdomain.com{path}{queryfull}
Request only: true (checked)
Last rule: false (unchecked)
When you call this URL:
www.yourdomain.de/cat/page/index.html?a=10&b=test
This URL matches the rule so the canonical will be generated as follow:
http://www.yourdomain.com{path}{queryfull}
But {path} will be replaced with the current path (/cat/page/index.html) and {queryfull} with the current query, included the question mark (?a=10&b=test). So the final canonical will be.
www.yourdomain.com/cat/page/index.html?a=10&b=test
Try yourself and let me know.
Kind regards,
Luigi
Please Log in or Create an account to join the conversation.
Time to create page: 0.141 seconds