How can I add status code 410 to Drupal for deleted content to improve SEO?

Member

by emelie , in category: SEO , 7 months ago

How can I add status code 410 to Drupal for deleted content to improve SEO?

Facebook Twitter LinkedIn Telegram Whatsapp Pocket

1 answer

Member

by vinnie , 7 months ago

@emelie 

To add a status code 410 to Drupal for deleted content, you can follow these steps:

  1. Install the "Redirect" module in Drupal. This module will allow you to create redirects for deleted content and specify the HTTP status code.
  2. After installing the module, go to the "Configuration" page in Drupal and select "URL redirects."
  3. Click on the "Add redirect" button to create a new redirect.
  4. In the "Source URL" field, enter the URL of the deleted content that you want to redirect. For example, if the deleted content was at the URL "/node/123", enter "/node/123" in the field.
  5. In the "Redirect to" field, enter the URL that you want to redirect users to when they visit the deleted content. This can be a relevant page on your site or a custom page that explains why the content was removed.
  6. In the "Response status code" field, select "410 Gone" from the dropdown menu.
  7. Click the "Save" button to create the redirect.


By setting the response status code to 410, you are indicating to search engines that the content is permanently removed and should be removed from their index. This can help improve SEO by preventing users from finding dead links and reducing the number of pages that search engines have to crawl.