In short
Ahrefs flags "Double slash in URL" for URLs with two slashes in a row in the path (not the // after https:). They usually come from joining a base URL ending in / with a path starting with /. Many servers return the same page for both versions, creating duplicates. Fix the template or link that builds the URL, and add a canonical or redirect to the clean version.
A stray slash looks harmless, but servers often treat /blog//post/ and /blog/post/ as two different URLs serving the same page.
Typical cause
const base = 'https://example.com/';
const path = '/blog/post/';
const url = base + path; // https://example.com//blog/post/
The fix is to join URLs with a helper that handles slashes, for example new URL(path, base).href in JavaScript.
How to fix it
Find where the flagged URLs are linked (incoming links in Ahrefs).
Fix the template, menu or setting that produced them, such as a site URL saved with a trailing slash and a path that starts with one.
Make sure each page has a canonical tag pointing to the clean URL.
Optionally, add a server rule that 301 redirects any double-slash path to the single-slash version.
WordPress: check menu links, the Site Address setting, and theme code that builds URLs with home_url() plus a leading slash.
Shopify, Webflow and Wix: usually caused by hand-typed links in content or custom code.
Custom builds: fix the URL-joining helper once, and every link is fixed.
This guide isn't affiliated with or endorsed by Ahrefs.
Related issues
Sources and references
Google Search Central, URL structure best practices for Google
MDN, URL() constructor

About the author
Nazmul Nikhil
Head of SEO & Assistant Manager, Digital Marketing at Notionhive
SEO and AI search consultant in Dhaka, Bangladesh, helping small and mid-size businesses in the USA, UK, Australia and Canada.



