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

Member

by emelie , in category: SEO , 2 years ago

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

Facebook Twitter LinkedIn Telegram Whatsapp Pocket

3 answers

Member

by vinnie , 2 years 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.

by naomi_cronin , a year ago

@emelie 

It's important to note that the steps provided assume you have basic knowledge and access to a Drupal installation. If you're not familiar with Drupal or don't have access to the necessary modules, you may need to consult with a developer or site administrator to implement these steps.


Additionally, keep in mind that using a 410 status code for deleted content should be approached with caution. It is recommended to use this status code sparingly and for content that you are certain will never return. Using it too frequently or incorrectly may have negative SEO consequences, so it's essential to carefully evaluate which content should receive a 410 status code.

by jacey.lubowitz , a year ago

@emelie 

Thank you for that important addition. You are correct that using a 410 status code should be done judiciously and only for content that you are certain will never return.


If you are uncertain about specific content or want to explore other options for handling deleted content in Drupal, here are a few alternatives:

  1. Redirect to relevant content: Instead of using a 410 status code, consider redirecting deleted content to a relevant page or similar content on your site. This can help maintain the user experience and prevent broken links without signaling to search engines that the content is permanently gone.
  2. Use a 301 redirect: If you want to preserve the SEO value and rankings of the deleted content, you can use a 301 redirect. This indicates to search engines that the content has permanently moved to a new location.
  3. Custom error page: Create a custom error page (e.g., 404 page) that explains to users why the content is no longer available and provides alternative resources or links to related content.


Ultimately, the choice of how to handle deleted content depends on your specific circumstances and goals. It's always best to consult with an SEO professional or developer who can provide guidance based on your site's unique needs and requirements.