Create 410 Error Page for WordPress

If you removed a subdirectory from your WordPress site and want to let the search engines know that it’s been permanently removed, here’s quick and easy way to create a 410 Error Page for WordPress.

1. Create a 410 error page with the name 410.php

2. Put this code in the page

<?php

 header( “HTTP/1.1 410 Gone” );

exit;

?>

3.  Add this line to your .htaccess

redirect 410 /name-of-subdirectory-which-was-removed
ErrorDocument 410 /410.php

example:
redirect 410 /forum
ErrorDocument 410 /410.php

FINISHED!

 

Bookmark & Share
Featured Products
  • M007
Sponsors
Best Sellers
Recommended
  • O012