fbpx

Linking Discontinued Products to Related Products for Organic Traffic

Handling Permanently Discontinued Products with Organic Traffic

When a product is permanently discontinued but still receives organic traffic, it’s essential to handle it properly to maintain a good user experience and SEO health. Here’s how you can manage this on Shopify and WooCommerce:

Shopify

  1. Inform Customers: Edit the product page to inform customers that the product is discontinued. You can add a message like “This product is no longer available.”
  2. Link to Related Products: Add links to related products on the same page. You can do this by editing the product description or using a related products app.
  3. Set Up a 410 Status Code: Once the product stops receiving traffic, you can set up a 410 status code to inform search engines that the page is gone permanently. Unfortunately, Shopify does not natively support 410 status codes, so you may need to use an app like “Easy Redirects” to manage this.

WooCommerce (WordPress)

  1. Inform Customers: Edit the product page to inform customers that the product is discontinued. You can add a message like “This product is no longer available.”
  2. Link to Related Products: Add links to related products on the same page. You can do this by editing the product description or using a related products plugin.
  3. Set Up a 410 Status Code: Use a plugin like “410 for WordPress” to set a 410 status code for the discontinued product page once it stops receiving traffic. This will inform search engines that the page is gone permanently.

Example Code for WooCommerce


  // Add this to your theme's functions.php file
  function set_410_status_for_discontinued_product() {
      if (is_product() && get_the_ID() == 'YOUR_PRODUCT_ID') {
          header("HTTP/1.1 410 Gone");
          echo "This product is no longer available.";
          exit();
      }
  }
  add_action('template_redirect', 'set_410_status_for_discontinued_product');