Skip to content
Back to skills

Trailing Slash

ASecurity

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.

  • 74,358 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 5, 2026
developmentgofrontend

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned October 5, 2026

npx -y skills add thedaviddias/Front-End-Checklist --skill trailing-slash --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Trailing Slash?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Trailing Slash
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/thedaviddias-trailing-slash/badge)](https://www.skillsdirectory.com/skills/thedaviddias-trailing-slash)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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

Files in this skill

  • SKILL.md2.1 KB
  • references/rule.md3.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…