Skip to content

SEO: make the MGH site canonical, not the GitHub Pages mirror - #1

Merged
ivazquez merged 1 commit into
masterfrom
seo/canonical-to-mgh
Sep 21, 2026
Merged

ivazquez merged 1 commit into
masterfrom
seo/canonical-to-mgh

Conversation

@ivazquez

@ivazquez ivazquez commented Sep 21, 2026 •

Copy link
Copy Markdown
Owner

Problem

vazquezgarcialab.mgh.harvard.edu and ivazquez.github.io serve byte-identical HTML (23,070 bytes each). When search engines see duplicates they obey the canonical tag — and every signal on the MGH site currently names the GitHub mirror as authoritative:

<!-- served from vazquezgarcialab.mgh.harvard.edu -->
<link rel="canonical" href="https://ivazquez.github.io/">
<meta property="og:url" content="https://ivazquez.github.io/">
robots.txt  →  Sitemap: https://ivazquez.github.io/sitemap.xml
sitemap.xml →  <loc>https://ivazquez.github.io/news/announcement_1/</loc>   …every entry

So the MGH site has been instructing search engines to rank the GitHub Pages mirror ahead of it. That is the configured behaviour, not a quirk of indexing.

Change

One line in _config.yml:

-url: https://ivazquez.github.io
+url: https://vazquezgarcialab.mgh.harvard.edu

site.url feeds the canonical tag, og:url and jekyll-sitemap. After this, both deployments name the MGH domain as authoritative; the GitHub Pages mirror defers to it, consolidating accumulated ranking signals onto the institutional domain.

Why this is safe for the GitHub Pages mirror

  • absolute_url is used exactly once in _includes/head.liquid — line 70, the canonical tag.
  • All 9 asset references in head.liquid use relative_url, so the mirror keeps rendering correctly. It simply stops claiming primacy.
  • No CNAME in the repo, so Pages continues serving at ivazquez.github.io as before.

Follow-ups (not in this PR)

  • Verify the MGH property in Google Search Console and submit https://vazquezgarcialab.mgh.harvard.edu/sitemap.xml. The google_site_verification: key in _config.yml is currently empty and is how the meta-tag verification is wired.
  • Deliberately not adding noindex to the mirror — noindex plus canonical are contradictory signals and are handled poorly. Canonical alone is the correct mechanism here.

Note on deployment

The MGH site is served by Plesk on erisweb5.partners.org, which pulls from this repo. Its push webhook has been returning 502 failed to connect to host since ~July 12 (port 8443 is firewalled externally), so the site went ~10 weeks stale. A manual pull has since restored it, but this change only reaches the MGH site on the next pull.

Both deployments serve byte-identical HTML, and site.url feeds the canonical
tag, og:url and jekyll-sitemap. With url set to ivazquez.github.io, the MGH
site emitted <link rel="canonical" href="https://ivazquez.github.io/"> and a
sitemap listing only github.io URLs, telling search engines the GitHub mirror
is the authoritative copy of the lab website.
@github-actions

Copy link
Copy Markdown

Failed prettier code check. Check this file for more information.

@ivazquez
ivazquez merged commit 7a04561 into master Sep 21, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant