Creative agency glossarySEO and Analytics

Trailing Slash

A trailing slash is the forward slash at the end of a URL, and whether a site uses it consistently decides whether each page has one address or two.

What is a trailing slash?

A trailing slash is the "/" at the end of a web address: riot.nyc/glossary/ rather than riot.nyc/glossary. Historically the slash meant a directory and its absence meant a file, and servers would serve the index of the directory when the slash was present. Modern sites and content management systems have mostly abandoned that distinction, but the two forms are still, technically, two different URLs. Unless the site decides which one is official and redirects the other to it, a search engine may treat the two as separate pages with identical content.

The slash on a domain root never matters: example.com and example.com/ are the same by definition. It is on every path beneath the root that the choice has to be made.

Why it matters

Why a trailing slash matters

Consistency is the whole point. If a site serves the same page at both forms without a redirect, links from other sites land on whichever version the linker happened to type, and the page's authority is split between two addresses. Analytics splits the same way, with one page reporting as two rows. Canonical tags can tidy up the search engine's view, but they do not fix the split in links or the untidiness in reporting. A single rule, enforced by a redirect, removes the problem entirely.

It also matters for anything downstream that compares URLs as strings: sitemaps, redirect maps, structured data, analytics filters and marketing tags. A site that is inconsistent about the slash is a site where every one of those lists has silent duplicates.

In practice

How a trailing slash works in practice

  1. 01

    The site picks one convention and makes the server enforce it. Most content management systems, WordPress among them, default to the trailing slash on pages and redirect the slashless form with a 301. Many modern frameworks default to no slash. Either is fine; the rule is that one form returns the page and the other returns a redirect to it, never both returning the page. Files with extensions, such as images and PDFs, never take a slash.

  2. 02

    Everything else then follows the rule: internal links, the sitemap, canonical tags, redirect maps, the URLs shared in campaigns. During a migration the convention is one of the first things to confirm, because a platform change that flips it silently doubles every URL on the site and breaks every inbound link until the redirects catch it.

At RIOT

Trailing slashes at RIOT

Every path on riot.nyc ends in a slash, including every page in this glossary, and the slashless form redirects to it. It is a small rule, but it means each term has exactly one address, which is the only way a thousand pages stay tidy.

See the work →

Watch out

What people get wrong about trailing slashes

Believing one form is better for SEO. Neither is; search engines are indifferent to the choice and care only that it is consistent. The other mistake is relying on the canonical tag alone and never adding the redirect, so the duplicate keeps collecting links and keeps appearing in reports. And teams often forget the sitemap and internal links after switching, which leaves the site pointing at URLs that now redirect, a slow leak of crawl budget on every page.

Questions

People also ask

Should URLs have a trailing slash or not?

Either works. What matters is choosing one convention and enforcing it with a redirect so every page has a single address. WordPress sites usually use the slash; many modern frameworks do not. Keep the whole site consistent.

Does a trailing slash affect SEO?

Only when a site is inconsistent. If both forms of a URL serve the same page without a redirect, search engines may see duplicates and links are split between two addresses. With one form enforced and the other redirected, there is no effect either way.

Does a trailing slash matter on the homepage?

No. The root of a domain with and without the slash is the same address by definition. The choice only applies to paths beneath the root, such as /about and /about/.

Next to it in the glossary

  1. 200 (OK) Response CodeA 200 OK response code is the server's confirmation that a request succeeded and the page was delivered as asked.
  2. 301 RedirectA 301 redirect is a permanent instruction that sends browsers and search engines from an old URL to a new one, carrying the old page's ranking signals with it.
  3. 302 RedirectA 302 redirect is a temporary instruction that sends visitors from one URL to another while telling search engines the original address will return.
  4. 304 Not ModifiedA 304 Not Modified response tells a browser or a crawler that the page has not changed since it was last fetched, so the cached copy can be used instead.
  5. 307 Temporary RedirectA 307 Temporary Redirect sends a visitor to a different URL for now, while guaranteeing that the request is repeated exactly as it was made.
  6. 403 ForbiddenA 403 Forbidden error means the server understood the request but refuses to serve the page, usually because the visitor does not have permission to see it.

Every SEO and Analytics term →

In the work

Where it shows up

All our creations →

From the journal

Read around it

The journal →

Talking the talk is one thing

We make the work.

RIOT is a creative agency and production studio in New York. Strategy, brand, film, photography, design and the campaigns that carry them, made by one team. A few lines is enough to start: we read every brief the same day.

    Footage