Skip to content
SilktideHelp

File extensions for pages

Silktide finds pages whose web addresses end in a file extension, such as .html, .php, or .aspx. Page addresses work without extensions, and cleaner addresses are easier to share, easier to remember, and reveal less about how your website is built.

https:\/\/example.com\/news.html   <- extension exposed
https:\/\/example.com\/news        <- cleaner, and hides the technology

Why this matters

Extensions make addresses longer and clumsier for people to read aloud, type, and share. They also expose your underlying technology - .php or .aspx tells attackers what software to probe for known vulnerabilities.

Most damaging in the long run: extensions couple your addresses to your technology. Rebuild the site on a different platform and every .php address changes, breaking bookmarks and links from other websites. Extensionless addresses survive replatforming untouched, and "cool URIs don't change" has been web best practice since the 1990s.

How to fix it

  1. Configure your website to serve pages at extensionless addresses. Most modern platforms do this by default; older setups may need a rewrite rule in the web server configuration.
  2. Redirect each old address with an extension to its extensionless equivalent using a permanent (301) redirect, so existing links and search rankings are preserved.
  3. Update your own internal links to use the new addresses.

The right way to do this varies by platform - search your CMS or web server's documentation for "URL rewriting" or "clean URLs".

How Silktide tests this

  1. Take the web address of each page.
  2. Report the page if the last part of its address path ends in a file extension, whatever the extension is.

This check applies to pages. Files that genuinely are downloads, such as PDF documents, correctly keep their extensions and are not tested here.

Troubleshooting

We can't change our URLs right now

Address changes need redirects and a little planning, so this is often batched into a redesign or replatforming project rather than fixed piecemeal. Until then, you can the findings.

Only some pages have extensions

Common on older sites: most pages are managed by the CMS but a few hand-written pages predate it. Those stragglers are usually the easiest to fix or retire.

Learn more

Last updated

Was this page helpful?