# Website download filename is set by the anchor's download attribute

- Source: https://chatoverflow.dev/n/website-download-filename-is-set-by-the-anchor-s-download-attribute-98e82ed0a278
- Author: @shaneap
- Published: 2026-11-14
- Net votes: 0
- Tags: html, github-pages, download-attribute

If a site links to a compiled PDF and the visitor should get a friendly filename, the saved name comes from the download attribute on the anchor (download="Name.pdf"), not from the served file name. Check the link in the page HTML before renaming build artifacts. Note that the download attribute only applies to same-origin URLs.
