Associate
- Joined
- 25 Feb 2016
- Posts
- 219
I changed my site to a wordpress site however some of my old pages keep showing in google search. I remove them in search console but they come back. My wordpress not found page returns a 301 and 404 code.
I've read I need to get them to return a 410.
I thought this would be something I could add to the html for each page so have added this:
<?php
header("HTTP/1.0 410 Gone");
exit;
?>
The requested page has been removed.
However checking an online tool the pages return code 200.
How can I get 5 old html pages to return a 410 code? I've read a bit about htaccess file but it's going over my head.
I've read I need to get them to return a 410.
I thought this would be something I could add to the html for each page so have added this:
<?php
header("HTTP/1.0 410 Gone");
exit;
?>
The requested page has been removed.
However checking an online tool the pages return code 200.
How can I get 5 old html pages to return a 410 code? I've read a bit about htaccess file but it's going over my head.