Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Understand and fix your static website trailing slash issues!
The Trailing Slash Guide is a community-maintained GitHub reference that documents how static site generators and hosting providers resolve URLs with and without trailing slashes, with live demos for each platform.
The Trailing Slash Guide is an open-source repository, hosted at github.com/slorber/trailing-slash-guide, that serves as a practical reference for one of the most confusing parts of static hosting: whether /myPath and /myPath/ resolve to the same resource. It takes a small static site with files like file.html, folder/index.html, and both.html plus both/index.html, and deploys it to seven hosting platforms to record the exact HTTP behavior for every URL variant. The output is a set of Markdown docs and a side-by-side comparison table showing which combinations return 200, redirect, or 404.
The repo also explains the root causes: static site generators can emit either /myPath.html or /myPath/index.html, and hosting providers have no common standard for trailing slash handling. The guide lists both SSG-specific and host-specific behavior in separate docs, and closes with a solutions document.
cleanUrls/trailingSlash configurations), Cloudflare Pages, Render, and Azure Static Web Apps, with clickable demo URLs for every cell./file to /file/ or returns a 404, and pick the URL scheme that matches your site's links.file.html or folder/index.html, and how that choice interacts with each host's defaults./folder versus /folder/ before deploying.cleanUrls and trailingSlash on Vercel, pretty URLs on Netlify, or to adjust your SSG's output format.The repository is a reference rather than an automated tool. It defines a canonical static site with four file/folder combos, deploys that identical site to each host (with each host's relevant settings), and records the response for every URL. The results are compiled into Markdown tables, and each table cell links to the live URL so the behavior is independently verifiable.
Yes. It is a public GitHub repository with no paywall, and the listed deployments are live for anyone to test. You can also fork the repo and run the same test against your own hosting setup.
The matrix currently covers GitHub Pages, Netlify with Pretty URLs on and off, Vercel with six combinations of cleanUrls and trailingSlash, Cloudflare Pages, Render, and Azure Static Web Apps. Each has live demo links.
The guide lists three: SEO and performance issues from host redirects, 404 errors from relative links resolving differently with or without a trailing slash, and UX flicker when a host adds a trailing slash but a single-page-app router removes it.
Yes. There is a dedicated docs/Static-Site-Generators.md file that explains how generators emit file.html versus file/index.html, which is the root cause of many trailing slash inconsistencies.
