Register Login

Change 404 Page to 410 page in Wordpress

Updated Jul 11, 2019


In my wordpress I want to give 410 Return Code insted of 404 page

1. Install Plugin "404page – your smart custom 404 error page"

2. Edit your 404.php

Manuel Edit 404.php file in your template folder 


Edit 404.php file on you current running theam and add this code on the top of the page and save the file

header("HTTP/1.0 410 Gone");


header("HTTP/1.0 410 Gone");
$page_content = ot_get_option('page404_content','Page not found');
$layout = 'full';


To check if the page is returning 410 as return code check your site url in " ".

If I check this url in " " it will show return code as 410. 

The return code will be 

HTTP/1.1 410 Gone check return code




  • 14 Sep 2017 12:39 am Guest

    admin kindly clear this. at which place we should palce code header("HTTP/1.0 410 Gone"); in 404.php ?