Skip to content
This repository has been archived by the owner on Dec 8, 2017. It is now read-only.

rel="canonical" #12

Merged
merged 1 commit into from
Jul 25, 2014
Merged

rel="canonical" #12

merged 1 commit into from
Jul 25, 2014

Conversation

konklone
Copy link

Re-implementing #4 after merge conflicts. Reproducing original PR message:

This adds a rel="canonical" link to the top of every page, with an absolute URL to https://www.notalone.gov, so that search engines aren't confused about any instance of this code on other domains (like 18f.github.io/notalone). Essentially, it prevents penalization for duplicate content and transfers all pagerank to the canonical domain.

To do this, I also added a permalink field to every page -- otherwise, the page.url field always adds index.html to the end of every canonical URL. I added the base canonical URL to _config.yml as a canonical field.

For more information on rel="canonical", Google's description: https://support.google.com/webmasters/answer/139066?hl=en

It looks like my text editor also deleted a lot of trailing whitespace (I have it configured to do that automatically on save). You can view the diff without that by adding ?w=1 to the end of this pull request's URL.

@konklone konklone mentioned this pull request Jul 25, 2014
@seanherron
Copy link

LGTM

seanherron added a commit that referenced this pull request Jul 25, 2014
@seanherron seanherron merged commit 2e354b8 into gh-pages Jul 25, 2014
@seanherron seanherron deleted the canonical branch July 25, 2014 15:49
@cscairns cscairns mentioned this pull request Aug 7, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants