Trailing Slashes and Canonical URLs Explained
Whether URLs should end with a slash, how trailing slashes can create duplicate pages, and how canonical tags and redirects solve it.
Should your URL be /about or /about/? Both can work. The important thing is to choose one and use it consistently.
Why it matters
To a server, /about and /about/ can be different URLs. If both return the same content, search engines may treat them as duplicates and split signals such as links between them. Visitors may also share both versions.
Common conventions
- URLs ending in a file extension, such as
/about.html, normally have no trailing slash. - Folder-style URLs often end in a slash:
/blog/. - Many content management systems choose one style for you.
Neither style is better for SEO. Consistency is what matters.
How to stay consistent
- Pick one format for each type of URL.
- Redirect the other version with a 301 redirect. Many servers and platforms can enforce this automatically.
- Use canonical tags. Add
<link rel="canonical" href="...">to each page, pointing to the preferred URL. - Link internally only to the preferred version.
- List only preferred URLs in your XML sitemap.
What a canonical tag does
A canonical tag tells search engines which URL is the main version when several URLs show the same or very similar content. Google treats it as a strong hint rather than an absolute rule, so redirects and consistent internal links work best alongside it.
Other duplicate URL sources
The same principle applies to:
http://vshttps://www.vs non-www- Uppercase vs lowercase paths
- URLs with tracking parameters
Every page on NS Tools Hub includes a canonical tag, and our slug generator produces lowercase slugs to avoid the case problem from the start.
Frequently asked questions
What is a canonical URL?
What is a canonical URL? It is the preferred address for a page when several URLs show the same content. You declare it with a canonical tag in the page head.
How to use canonical tags?
How to use canonical tags: add a link rel="canonical" tag pointing to the preferred URL on every page, link internally only to that URL and list only canonical URLs in your sitemap.
Does a trailing slash matter for SEO?
For trailing slash SEO, consistency is what matters: choose /page or /page/, redirect the other and use canonical tags.
Should I use www vs non-www?
In www vs non-www, either is fine. Pick one, redirect the other with a 301, and add an HTTP to HTTPS redirect so every visitor lands on one secure version.
Does robots.txt disallow stop indexing?
No. A robots.txt disallow rule stops crawling, but a page can still be indexed if other sites link to it. To keep a page out of search, use a noindex tag and let it be crawled.
Try the free Slug Generator
Turn titles into clean, SEO-friendly URL slugs with bulk mode and smart trimming.
Open Slug Generator