# Ensure Consistent Trailing Slashes for SEO

Enforce a single trailing slash convention across all URLs to avoid duplicate content and improve SEO rankings. The deliverable includes 301 redirect rules, canonical tags, and consistent internal linking.

**Canonical URL:** https://skillshunter.net/skills/github-thedaviddias-front-end-checklist-skills-trailing-slash-5205dbf95818

**JSON URL:** https://skillshunter.net/api/public/v1/skills/github-thedaviddias-front-end-checklist-skills-trailing-slash-5205dbf95818

**Markdown URL:** https://skillshunter.net/skills/github-thedaviddias-front-end-checklist-skills-trailing-slash-5205dbf95818.md

**Instructions download URL:** https://skillshunter.net/skills/github-thedaviddias-front-end-checklist-skills-trailing-slash-5205dbf95818/download

**Category:** Content & Editorial

**Source URL:** https://github.com/thedaviddias/Front-End-Checklist/blob/e8d14d049010e2ce25afcd5e8609dfcbbe63e47e/skills/trailing-slash/SKILL.md

**Source commit:** e8d14d049010e2ce25afcd5e8609dfcbbe63e47e

**Listing approved at:** 2026-11-24

**Created at:** 2026-11-23T05:59:58.000000Z

**Updated at:** 2026-11-24T07:12:47.000000Z

## Catalog information

The following descriptions are catalog information. Listing approval does not mean the skill has been tested or is safe for every environment.

### Editor's note

Before implementing, validate the server or framework configuration to ensure redirect rules can be applied. Choose either trailing slash or no trailing slash as the preferred convention and update all internal links, sitemaps, and canonical tags accordingly.

### When to use it

- Auditing a website for duplicate content due to inconsistent trailing slashes
- Setting up a new website with a standardized URL structure
- Post-platform migration to resolve URL convention conflicts

## Skill instructions

---
name: trailing-slash
description: "Use when applies to all static and dynamic websites. Use when auditing a site for duplicate content, setting up a new site, or after migrating platforms that changed URL conventions."
metadata:
  category: seo
  priority: medium
  difficulty: beginner
  estimatedTime: "10"
  source: frontendchecklist.io
  url: https://frontendchecklist.io/rules/seo/trailing-slash
---

# Use trailing slashes consistently

Inconsistent trailing slashes create duplicate content — Google sees `/page` and `/page/` as two separate URLs competing for the same ranking, splitting PageRank between them.

## Quick Reference

- Pick one convention — trailing slash or no trailing slash — and enforce it site-wide with 301 redirects
- Both `/page/` and `/page` must not return HTTP 200; one must redirect to the other
- Set `rel="canonical"` to the preferred version on all pages
- Ensure all internal links, sitemaps, and canonical tags use the same convention

## Check

For a sample of URLs, test both the trailing-slash and non-trailing-slash versions. Both should NOT return HTTP 200 — one must 301-redirect to the other. Check that internal links, sitemap `<loc>` values, and canonical tags all use the same convention consistently.

## Fix

Choose a canonical URL convention. Add server or framework redirect rules so the non-preferred variant permanently redirects (301) to the preferred one. Update all internal links, canonical tags, and sitemap entries to use the preferred format.

## Explain

Explain why `/page` and `/page/` are treated as distinct URLs by default, how this creates duplicate content, and how 301 redirects and canonical tags resolve the ambiguity.

## Code Review

Review metadata generation, rendered HTML, structured data, and response headers related to Use trailing slashes consistently. Flag exact routes or templates where search-facing output violates the rule, and describe how to verify the final page output.

---

For full implementation details, code examples, and framework-specific guidance,
see `references/rule.md`.

Rule page: https://frontendchecklist.io/rules/seo/trailing-slash

