We have a number of websites that have now been closed down and deleted however are still indexed in Google, even though they are returning a 404.
I want to set http 410 for everything on the domain, how would I do this in the htaccess? Use wildcards?
I want to set http 410 for everything on the domain
You can use this rule as your first rule in your DOCUMENT_ROOT/.htaccess
file:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com$ [NC]
RewriteRule ^ - [L,R=410]
Don't forget to replace domain.com
with your actual domain name.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With