Title: ErrorDocument
Last modified: August 18, 2016

---

# ErrorDocument

 *  [blueorder](https://wordpress.org/support/users/blueorder/)
 * (@blueorder)
 * [20 years, 6 months ago](https://wordpress.org/support/topic/errordocument/)
 * Little help…
 * I’ve been trying to set a custom 404 error with ErrorDocument in my .htaccess.
   Every time I try to enter an incorrect address to a file or folder, the page 
   reloads with my theme and just the post text.
 * Here’s how my .htaccess file looks:
 * > ErrorDocument 404 /404.php
   > RewriteEngine On
   >  RewriteCond %{HTTP_HOST} !^test.theamells.net [NC] RewriteRule
   > ^(.*)$ [http://test.theamells.net%](http://test.theamells.net%){REQUEST_URI}[
   > R=301,L]
   > # BEGIN WordPress
   >  <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / 
   > RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule./
   > index.php </IfModule>
   > # END WordPress

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [20 years, 6 months ago](https://wordpress.org/support/topic/errordocument/#post-299371)
 * Can you not just specify those error docs through your cpanel ?
 * Where is 404.php ?
    Try putting that code after the WordPress block ?
 *  [schestowitz](https://wordpress.org/support/users/schestowitz/)
 * (@schestowitz)
 * [20 years, 6 months ago](https://wordpress.org/support/topic/errordocument/#post-299372)
 * Have 404.shtml in your home directory to achieve custom error pages in Apache.
   You might need to point to such files though rather than do it the laborious 
   way as you are attempting to do.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘ErrorDocument’ is closed to new replies.

## Tags

 * [errordocument](https://wordpress.org/support/topic-tag/errordocument/)
 * [htaccess](https://wordpress.org/support/topic-tag/htaccess/)

 * In: [Alpha/Beta/RC](https://wordpress.org/support/forum/alphabeta/)
 * 2 replies
 * 3 participants
 * Last reply from: [schestowitz](https://wordpress.org/support/users/schestowitz/)
 * Last activity: [20 years, 6 months ago](https://wordpress.org/support/topic/errordocument/#post-299372)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
