While it has been discussed before, I feel a few changes should be available for the Canonical URL handling:
- There should be an option to pass the Canonical URL value via the url() command to obtain the URL alias; this would default to FALSE, so the system path would be used.
- There should be an option to make the Canonical URL an absolute value; this would default to FALSE so that only the local path is used (along with Drupal's normal BASE path value this is sufficient).
- Ensure all in-module instructions are accurate for both how the module works and Google's supported use.
Comments
Comment #1
jwilson3As it currently works, if globalredirect/pathauto/redirect/etc is installed we have a fundamental conundrum, that could confuse search engines...
Example: Page with alias "/myalias" has a canonical tag that points to node/X which automatically redirects to /myalias, which points to node/X, which redirects to...
What if we run through url() by default, or calculate the default for this option, based on the presence of these other modules to keep people that are unsure of the configuration to have sensible defaults that won't penalize them out of the box.
Comment #2
jwilson3For clarification on the third bullet point in the OP. The Description text for the canonical field on per-node edit forms says the following, (emphasis added by me):
The last phrase is technically incorrect, as NodeWords does actually support absolute URLs that point to other domains. Additionally, this is a valid use of rel="canonical", so the description text should be updated to remove this statement.
Comment #3
damienmckennaThe form field's description has been updated to the following:
I believe that is a more technically correct message.
Comment #4
damienmckennaAlso, the option to use URL aliases was added via #650362: Canonical URL doesn't use the path alias (and URL is relative when base_url is empty).
Comment #5
jwilson3kewl, #3 sounds good.
Comment #6.0
(not verified) commentedAdded a third item to cover updating the instructions.