Add Google site verification 5s redirect also link to new site#10
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds Google Search Console verification and implements a redirect mechanism from the old GitHub Pages site to the new pragmaticpapers.com domain. The changes support migrating users and search engine indexing to the new site.
Changes:
- Added Google site verification meta tag for Search Console
- Added 5-second redirect to the new site
- Added canonical link to indicate the preferred URL for search engines
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <meta http-equiv="refresh" content="5; URL=pragmaticpapers.com" /> | ||
| <link rel="canonical" href="pragmaticpapers.com" /> |
There was a problem hiding this comment.
The URL in the refresh meta tag is missing the protocol (https://). Without the protocol, browsers may interpret this as a relative path rather than an absolute URL, which could cause the redirect to fail or redirect to an incorrect location.
| <meta http-equiv="refresh" content="5; URL=pragmaticpapers.com" /> | |
| <link rel="canonical" href="pragmaticpapers.com" /> | |
| <meta http-equiv="refresh" content="5; URL=https://pragmaticpapers.com/" /> | |
| <link rel="canonical" href="https://pragmaticpapers.com/" /> |
| content="fmJMGQNzt7v5bPW9ZxqzFdn1wHu9EJT4W00N3wp1pZs" | ||
| /> | ||
| <meta http-equiv="refresh" content="5; URL=pragmaticpapers.com" /> | ||
| <link rel="canonical" href="pragmaticpapers.com" /> |
There was a problem hiding this comment.
The canonical link href is missing the protocol (https://). According to HTML specifications and SEO best practices, canonical URLs should be absolute URLs including the protocol. Without it, search engines may not correctly interpret the canonical URL.
| <link rel="canonical" href="pragmaticpapers.com" /> | |
| <link rel="canonical" href="https://pragmaticpapers.com/" /> |
Context
Adds site verification code for Google Search console so I can manually tell google that we have a new website through the console.
Adds a <link> with rel="canonical" to suggest to site indexers that we have another preferred website.
Adds a meta tag to redirect after 5 seconds
Test Plan
After pushing to upstream, visit https://pragmaticpapers.github.io/, should be redirected after 5 seconds.
We will have to wait for Google before we see our site at the top of search results