---
title: Run action after a 404 error is inserted
url: "https://www.seopress.org/support/hooks/run-action-after-a-404-error-is-inserted/"
lang: en-US
updated: 2025-05-14
hook_name: seopress_after_create_404
required_version: 8.8
---

# Run action after a 404 error is inserted

- **Hook name:** `seopress_after_create_404`
- **Required version:** 8.8

```php
add_action('seopress_after_create_404', 'sp_after_create_404');
function sp_after_create_404($id) {
	//do your stuff here

    return $something;
}
```

Source: [https://gist.github.com/wp-seopress/04d2b5d5bde1f801f3b62f6baa40de8f](https://gist.github.com/wp-seopress/04d2b5d5bde1f801f3b62f6baa40de8f)



