GitHub Pages 301 Redirect HTML Builder
GitHub Pages doesn't support server-side redirects — you ship static files. The standard workaround is an HTML page with meta-refresh + canonical + JS redirect. This builder generates that HTML for any old → new URL pair.
How to use the GitHub Pages 301 Redirect HTML Builder
Enter the target URL to redirect to and an optional title shown briefly during the hop. Copy the generated HTML, or download it as index.html and place it at the old path in your repo. Visitors are forwarded by meta-refresh, canonical link, and a JavaScript fallback.
Redirecting on a static host
GitHub Pages, and static hosts like it, serve files and nothing else — there is no server to issue a real 301 when a page moves. The common workaround is a small HTML page at the old path that sends visitors onward three ways at once: a meta-refresh tag, a canonical link for search engines, and a JavaScript fallback. Hand-writing that markup for every moved URL is tedious and easy to get subtly wrong.
This generates that redirect page for any target URL — meta-refresh, canonical, and JS in one file you save as index.html at the old location. It is the static-host answer; on a server that supports real redirects an .htaccess 301 is cleaner, which the .htaccess generator produces, and to choose between a permanent and temporary redirect, the HTTP status cheat sheet explains 301 versus 302.
Common use cases
- Moved a page — keep an old GitHub Pages URL working after restructuring.
- Custom-domain switch — point old paths at a new domain.
- Link preservation — stop external links to an old URL from 404ing.
- Jekyll sites — pair with the jekyll-redirect-from pattern for moved posts.
- Project rename — redirect the old project-pages path to the new one.