Basic HTML installation error_page 404 not working

I just completed a basic HTML installation for www.howtocleanthings.com, but the 404 page doesn’t seem to be working. Whenever I type in some nonsense url like (www.howtocleanthings.com/kjdhakjhad), the page returned is the homepage, not a 404 error.

How do I fix this? I added this line to my server block: error_page 404 /404.html; and it still doesn’t work.

Its seems like you are created html site http://www.howtocleanthings.com/

You need to create index.html in http://www.howtocleanthings.com/ webroot

  
echo "Its Works" >> /var/www/howtocleanthings.com/htdocs/index.html  

Yeah, that already happened. It’s a --html site that I installed a long time ago. The index.html is there in the root folder, but it’s impossible to get a 404 error to show up, even on a fresh install at this server: 23.253.230.114

I figured it out. In order to get a 404 to return, I had to comment out this line in the available-sites file:

location / {  
		# try_files $uri $uri/ /index.html;  
	}

Hi @samoya22,

Glad to know your issue is resolved. I am closing this support ticket for now.

Feel free to create a new support ticket if you have any queries further. :slight_smile: