Title: 404 Customizing
Last modified: August 19, 2016

---

# 404 Customizing

 *  [jayperkins72](https://wordpress.org/support/users/jayperkins72/)
 * (@jayperkins72)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/404-customizing/)
 * Hi,
 * I am running a site that routinely has posts that expire and thus no longer exist.
   So I need a good 404 page.
 * Is it possible to include the expired page’s title dynamically (using variables)
   into the 404 page?
 * For example, if an expired post was titled “2007 Is a Great Year” and someone
   ends up at [http://some-domain-name.com/2007-is-a-great-year/](http://some-domain-name.com/2007-is-a-great-year/)
   they will get a 404 page.
 * I would like to put the “2007 Is a Great Year” between <h1></h1> and make it 
   part of the 404 page. Instead of, for instance, “Page Not Found”
 * If possible, how do I do this? What variable do I use?
 * Thanks for any help. I hope this made sense and is not too convoluted.

Viewing 1 replies (of 1 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/404-customizing/#post-1307900)
 * `$_SERVER['REQUEST_URI']` should give you the url that the user requested but
   if the page has been deleted from the database, there’s no way to finding out
   it’s original title. The best I think you can do is to try and extract the last
   part of the request url and try to build a human-readable pseudo-title from that.

Viewing 1 replies (of 1 total)

The topic ‘404 Customizing’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [16 years, 6 months ago](https://wordpress.org/support/topic/404-customizing/#post-1307900)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
