Make WordPress Core

Opened 6 years ago

Closed 3 years ago

#40777 closed enhancement (duplicate)

Using a static 404 HTML file (dynamically generated) (and/ or .htaccess instead of favicon.ico)

Reported by: design_dolphin's profile design_dolphin Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.8
Component: Bootstrap/Load Keywords:
Focuses: performance Cc:


This is a follow-up to #3426.

favicon.ico is loaded and this causes an additional request when loading a page, even when a website is not using this browser feature. I'm not going to rehash the pro and con arguments in the previous ticket, and instead will focus on continuing towards the future from here.

Possible Solution:

If the issue is that serving 404 costs too much CPU, etc, wouldn't it be better to serve a static 404 then? E.g. a (cached from the theme) html page and/or through .htaccess

For example in .htaccess:

ErrorDocument 404 "<H1>Page not found</H1>"


ErrorDocument 404 /404.html

Additional performance benefit:
This could eliminate a broader range of performance issues with generating a dynamic 404.

Source .htaccess example:

Change History (1)

#1 @SergeyBiryukov
3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi there, welcome back to WordPress Trac! Sorry it took so long for someone to get back to you.

Thanks for the report, we're already tracking this issue in #17246.

Note: See TracTickets for help on using tickets.