i’m using porkbun for my hosting and i was wondering how to make a custom 404 page. i have a “not-found.html” file already, but going to a page that doesn’t exist just gives a blank document with 404. looking it up online, i think i have to do something with DNS records but i still don’t really have a clue what a DNS record is and how i could use it to make links that don’t work redirect to a 404 page. thank yall for any help ![]()
I don’t think you need to mess with DNS records to set a custom 404 page. If your web hosting is set up with Porkbun, they should be able to tell you if your site is hosted with Apache or Nginx. Generally, Porkbun’s cPanel hosting seems to be on Apache, but WordPress hosting is on Nginx.
If you’re on Apache, you might be able to create a .htaccess file in the root of your website. In there, you should be able to add the following line.
ErrorDocument 404 /custom-404.html
Once you’ve uploaded your .htaccess file you should be in business.
Nginx is more complicated, mainly because I don’t think that HTTPD implements per-site configuration via .htaccess like Apache does. I can’t help you there.
(apologies for late response) ah-- i see my problem is that my hosting is the basic static hosting and not the cPanel tier, so adding an .htaccess file doesn’t seem to do anything. but i’m not sure there’s an alternative i have for the moment then. (but ty regardless
)
No worries. I would suggest checking Porkbun’s documentation or contacting their support staff. There might be something there that you can use.