Soft Error Codes

For some reason, when an HTTP error occurs, the web servers simply redirect to the error page, returning a 200 OK response, rather than raising the appropriate HTTP error code. This is something that should probably be fixed, but won’t because I’m considered a new user.

Hi and welcome to the forum

Create your custom error pages (for example 404.html)
upload them to any dir or subdir in htdocs folder

remember the path to these files

create .htaccess file in root of htdocs folder with this content (of course edit the address)

# error redirect
ErrorDocument 400 http://yourdomain/errorpages/400.html
ErrorDocument 401 http://yourdomain/errorpages/401.html
ErrorDocument 403 http://yourdomain/errorpages/403.html
ErrorDocument 404 http://yourdomain/errorpages/404.html
ErrorDocument 503 http://yourdomain/errorpages/503.html

in my example, custom error pages are located at this address

if you use https then modify http from my example to https

make sure that the address of these pages is absolute (start with http/s)
and not relative

because if is relative…
when someone comes to the subfolder of the subfolder and ask something that does not exist or does not have permission it will appear infinityfree error pages not your custom

Just don’t call your dir errors
that directory name is reserved for web servers and you cannot access any files contained within


I tried your solution, but it appears that it doesn’t work. Running a fake URL through this HTTP status checker still seems to return a status of 200 OK rather than 404 Not Found. When running a fake Google URL through this, it correctly identifies the page as 404, but these ones don’t. Also, when an error occurs, it changes the address to that of the 404 page, which shouldn’t happen.

1 Like

just test it on a real browser


Or you can use Cloudflare if you own a domain
and thus bypass that security mechanism

So all online tools will work and it will be able to peek at your website

1 Like

Platform limitations make it hard to make this happen. That said, what actual negative impact does this give you? The explanation “it’s not how you’re supposed to do it” is not very useful.

Where did you get this idea from?

After giving it some more thought, I realize that it actually doesn’t matter. I saw something about it on a website that I was looking at for restricting access to an internal directory, but looking back, this just seems like an exaggerated nitpick. After doing some more thinking, this is actually helpful for something that I’m doing with my website. I don’t want to say what exactly it helps with though, as saying it kind of ruins the benefit that it has.

If something in our platform is causing issues, we’re to look at how we can fix this. But then we do need to understand what exactly the problematic behavior is so we can tackle it in a way that actually helps you.

If you don’t want to say what the issue is, we can’t really figure out a solution.

What I was saying is that this fake 404 actually helps me with the thing. Again, as I mentioned before, not really a big deal, just me making a big deal over nothing.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.