3

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?

1 Answers1

4

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.

anubhava
  • 761,203
  • 64
  • 569
  • 643