Whenever I print a webpage from my browser, the page's URL gets printed at the bottom of the page.

There is no option for this in the printer.
There is no option for this in the browser.

Is this dependant on the file type/extension ?

Is there a way to prevent the URL from printing ?

Thanks,
Pedro1

Dani AI

Generated

This is a browser/print-driver feature, not something in the page file itself. As hinted, the browser controls the header/footer that often contains the URL; it is not added by HTML on the page and therefore not reliably removable from inside the page. asked whether file type matters — generally it does not: the browser or PDF/printer software decides what to stamp on the printed sheet, so the same HTML may print with or without a URL depending on the viewer and its print settings. s comment confirms the simple solution works for many users, but other scenarios need different steps.

Common fixes (user side)

  • In modern browsers there is a print-preview option to disable headers/footers: Chrome/Edge have a “Headers and footers” checkbox in Print -> More settings; Safari has “Print headers and footers” in Print -> Show Details; Firefox exposes header/footer fields in Page Setup where you can clear them. See Chrome and Firefox help for up-to-date steps: and Firefox print help.

For developers / programmatic PDFs

  • You cannot reliably suppress the browser’s built-in header/footer from inside page CSS. For server-side or headless PDF generation use generator options (for example, Puppeteer: page.pdf({ displayHeaderFooter: false })) so the PDF is produced without browser-added headers.

Small print CSS tips

@media print {
  /* blocks sites that inject link URLs after anchors for print */
  a[href]:after { content: none !important; }
  @page { margin: 1cm; }
}

If a URL still appears, check printer-driver or corporate print-management settings (some tooling adds footers), or print to PDF and inspect the PDF viewer’s print options. For guidance on print styles see MDN’s @media print docs: .

In general, the page elements for the headers and footers are controled by the browser (IE, Firefox, and Opera, for example, all display somewhat different information).

For browsing, you can turn this off in the Page Setup. Using Internet Explorer as an example, go to File > Page Setup and removing the tags in the Header and Footer boxes. This will provide a clean print of the page without the noted headers and footers.

Hope this helps!

Sometimes it is the easiest things that we overlook - even more than 3 months old, this answer works like a dream. Thank you!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.