Change style of 403 and 404 errors

How can i change style of 403 and 404 errors?
p.s i can’t find them here screenshot

p.s i can’t find them here screenshot

Those are only the status codes which you want your website to send to the browser when the redirect occurs.

How can i change style of 403 and 404 errors?

You can’t change the style of errors pages, however you can use .htaccess file to redirect the browser to specific documents when such errors occur.

  1. Open File Manager

  2. Go to /public_html/.htaccess (if you see no such file, go to the upper right corner of the screen, and select “New File”. Name it .htaccess)

  3. Append this line to it: ErrorDocument ERROR_CODE PATH_TO_DOCUMENT

Replace ERROR_CODE with the error code (ie: 403, 404) and PATH_TO_DOCUMENT with the path to the document you want to be displayed to the browser when this error occurs.

Full example: ErrorDocument 404 /error_codes/page_error_404.htm

NOTES:

  1. You can add as many ErrorDocument directives as you want. Just make sure you don’t use the same error code for different paths, otherwise you might get Error 500

  2. ErrorDocument does not redirect to 000webhost built-in error pages. It just redirects to pages provided by you.

1 Like

i know that method , i thought i can change it without .htaccess

1 Like

You can’t. Sorry :sweat:

1 Like