410s not working?

#958310
  • Resolved Nick
    Rank Math pro
    Content AI Starter

    Hi,

    I’m using your redirection tool. I want all pages containing /tag/ to be 410s. I’ve set it up and saved the settings but on the front end these pages still show as 404s.

    How do I turn these 404 pages into 410s? Please let me know or fix this issue asap.

    Thanks!

Viewing 12 replies - 1 through 12 (of 12 total)
  • Hello,

    We apologize for the issue you are facing with the 410 status codes not working as expected. It sounds like there may be a configuration issue with the redirection settings.

    To ensure that your pages containing /tag/ are set to return a 410 status code, please follow these steps:

    1. Enable the Redirection Module: Make sure that the Redirection module is enabled in Rank Math. You can do this by navigating to Rank Math SEO → Dashboard and enabling the Redirection module if it’s not already active.
      Enabling the Redirections module in Rank Math SEO plugin

    2. Access Redirections: Go to the Redirections section under the Rank Math SEO menu and click on Add New to create a new redirection rule.
      Clicking the Add New button in the Redirections page

    3. Configure the Redirection: In the Redirections page, enter the source URLs that contain /tag/ in the Source URLs field. Make sure to select the 410 Content Deleted option in the Maintenance Code section. This will ensure that those pages return a 410 status code instead of a 404.
      The Source URLs feature of Rank Math
      clicking on the 410 content deleted option in redirections feature of Rank Math

    4. Save Changes: After configuring everything, click on the Add Redirection button to save your changes.

    If you have followed these steps and are still experiencing issues, it may be beneficial to check for any caching plugins or server-level caching that might be affecting how the status codes are displayed on the front end. Clearing your cache could resolve this issue.

    If you continue to have problems, please reply to this ticket, and a human agent from our support team will assist you further. Thank you for raising this concern!

    Sources:
    How to Set 410 Status Code in Bulk for WordPress » Rank Math

    Nick
    Rank Math pro
    Content AI Starter

    I followed these instructions and that’s how I had it set before (how do I attach a screenshot to show you?)
    Yet the /tag/ pages are still returning 404s and not 410s. See here: https://tattoos.ai/tag/american-traditional-master-sword-tattoo/

    I also, cleared the cache in WP. What’s the issue? I need this resolved asap. Thanks!

    Nick
    Rank Math pro
    Content AI Starter

    Any updates? We need these 410s in place as soon as possible. I don’t see an option to upload an image file here to show you a screenshot of our settings.

    Hello,

    Thank you for contacting us. We apologize for any inconvenience this issue may have caused.

    You can share screenshots with us using the following tool: https://imgur.com/upload

    Here is a guide on common issues that can affect your Rank Math redirect rules and solutions: https://rankmath.com/kb/solving-redirection-issues-using-rank-math-seo/

    We look forward to helping you.

    Thank you.

    Nick
    Rank Math pro
    Content AI Starter

    Here’s the screenshot link: https://imgur.com/a/lN1C2BW
    With these settings in place why is it returning 404s and not 410s for /tag/ pages?

    Hello,

    Please update the redirect to this Regex instead of Starts with:

    Source: tag/(.*)
    Type: Regex
    Destination: 410 Maintenance

    Once done, clear your website’s cache and check those tag pages again.

    Looking forward to helping you.

    Nick
    Rank Math pro
    Content AI Starter

    Thanks I just implemented the Regex changes you recommended. It looks like those pages are now showing 410. Can you check and confirm? Here are a few examples of those /tag/ pages we want to be gone with a 410.

    https://tattoos.ai/tag/moulin-rougue-elephant-tattoo-ideas/
    https://tattoos.ai/tag/ladybug-tattoo-black-and-gray-spiral/
    https://tattoos.ai/tag/birth-to-death-tattoo/

    Also, why did it not work with ‘starts with’ but with your Regex approach? I mean those URLS I wanted gone did start with /tag/. Thanks!

    Nick
    Rank Math pro
    Content AI Starter

    Also, I have a similiar issue with URLs that end with _php7. In RankMath I set it to:

    Source: _php7
    Type: End With
    Maintenance Code: 410

    However, these URLs still exist:

    https://tattoos.ai/?t41028_php7
    https://tattoos.ai/?t66569_php7
    https://tattoos.ai/?t31653_php7

    Why is that not working and how do I fix it?

    Nick
    Rank Math pro
    Content AI Starter

    Any updates on the 410s not working for _php7 urls as described above?

    Hello,

    We apologize for the delay in getting back to you.

    Redirections for parameterized URLs are only available for Rank Math PRO subscribers.

    You might need to create these redirections in the .htaccess file.

    Don’t hesitate to let us know if you need our assistance with anything else.

    Nick
    Rank Math pro
    Content AI Starter

    I never created those parameterized URLs. Not sure where they came from. So there’s no way to do this without using the RankMath Pro version? It’s only a few URLS with that issue.

    Hello,

    Yes, redirecting URLs with query parameters requires Rank Math PRO. However, you can manually handle this via your .htaccess file or a custom PHP function.

    You can use the following filter to redirect the URLs with the _php7 parameter:

    function custom_redirect_query_params() {
        if (isset($_SERVER['QUERY_STRING']) && strpos($_SERVER['QUERY_STRING'], '_php7') !== false) {
            status_header(410);
            exit;
        }
    }
    add_action('template_redirect', 'custom_redirect_query_params');

    Here is how to add a filter to your site: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 12 replies - 1 through 12 (of 12 total)

The ticket ‘410s not working?’ is closed to new replies.