{"data":{"slug":"github-thedaviddias-front-end-checklist-skills-trailing-slash-5205dbf95818","title":"Ensure Consistent Trailing Slashes for SEO","summary":"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.","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","download_url":"https:\/\/skillshunter.net\/skills\/github-thedaviddias-front-end-checklist-skills-trailing-slash-5205dbf95818\/download","category":{"slug":"content-editorial","name":"Content & Editorial"},"editor_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.","instructions":"---\nname: trailing-slash\ndescription: \"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.\"\nmetadata:\n  category: seo\n  priority: medium\n  difficulty: beginner\n  estimatedTime: \"10\"\n  source: frontendchecklist.io\n  url: https:\/\/frontendchecklist.io\/rules\/seo\/trailing-slash\n---\n\n# Use trailing slashes consistently\n\nInconsistent trailing slashes create duplicate content \u2014 Google sees `\/page` and `\/page\/` as two separate URLs competing for the same ranking, splitting PageRank between them.\n\n## Quick Reference\n\n- Pick one convention \u2014 trailing slash or no trailing slash \u2014 and enforce it site-wide with 301 redirects\n- Both `\/page\/` and `\/page` must not return HTTP 200; one must redirect to the other\n- Set `rel=\"canonical\"` to the preferred version on all pages\n- Ensure all internal links, sitemaps, and canonical tags use the same convention\n\n## Check\n\nFor a sample of URLs, test both the trailing-slash and non-trailing-slash versions. Both should NOT return HTTP 200 \u2014 one must 301-redirect to the other. Check that internal links, sitemap `<loc>` values, and canonical tags all use the same convention consistently.\n\n## Fix\n\nChoose 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.\n\n## Explain\n\nExplain 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.\n\n## Code Review\n\nReview 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.\n\n---\n\nFor full implementation details, code examples, and framework-specific guidance,\nsee `references\/rule.md`.\n\nRule page: https:\/\/frontendchecklist.io\/rules\/seo\/trailing-slash\n","use_cases":["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"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/thedaviddias\/Front-End-Checklist\/blob\/e8d14d049010e2ce25afcd5e8609dfcbbe63e47e\/skills\/trailing-slash\/SKILL.md","source_commit":"e8d14d049010e2ce25afcd5e8609dfcbbe63e47e","license":null,"version":null,"listing_approved_at":"2026-11-24","created_at":"2026-11-23T05:59:58.000000Z","updated_at":"2026-11-24T07:12:47.000000Z","seo_title":"Fix duplicate content with trailing slashes","seo_description":"Ensure consistent trailing slashes to avoid duplicate content issues and improve SEO rankings.","seo_keywords":["trailing slash SEO","duplicate content fix","URL structure optimization","canonical tag setup","301 redirect configuration"]}}