Redirect From Old AMP URL’s

#970330
Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello,

    I apologize for the issue you are facing. To redirect URLs with query parameters like ?amp=1 and ?noamp=mobile to their non-AMP versions, you can set up redirections in Rank Math using the Redirection Manager. Here’s how you can do it:

    1. Navigate to Redirections

    Make sure you have the Redirection module activated in Rank Math. You can find this in your WordPress Dashboard under Rank Math SEO → Dashboard.

    2. Add New Redirection

    Click on Add New to create a new redirection.

    3. Set Up the Redirects

    For the redirects you mentioned, you can use the following settings:

    Repeat the same for the second URL:

    4. Save Changes

    Make sure to save the changes after adding the redirects.

    This will ensure that any requests to those specific URLs will be redirected to the non-AMP version without any issues.

    If you have any further questions or need assistance, feel free to reply to this ticket, and a human agent from our support team will assist you further!

    Sources:
    Redirect all AMP pages to non-AMP pages » Rank Math
    Solving Redirection Issues Using Rank Math SEO Plugin » Rank Math

    This is an automated reply from Rank Math Support Bot. Your ticket has been assigned to a human agent and we will get back to you shortly.

    Hello,

    Thank you so much for getting in touch.

    You need to create a regex redirection by following this guide.

    Here’s also I guide you can follow: https://rankmath.com/kb/redirect-all-amp-pages-to-non-amp-pages/

    If it goes in a redirection loop, you need apply the following filter code to ensure the query parameters aren’t passed along to the destination URL:

    add_filter( 'rank_math/redirection/add_query_string', function($value, $matched) {
    	return false;
    }, 10, 2 );

    You may refer to this guide on how to add filters to your website: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Let us know how that goes.

    Not work, because url’s already indexed, I need remove from Gooogle with redirects

    Hello,

    Could you please share the affected URL so we can check? You can add it to the sensitive data section by editing your first post

    Sensitive Data Section

    It is completely secure, and only our support staff has access to that section.

    Meanwhile, please note that if you’ve configured your website to use the query parameter ?amp for AMP pages and disabled the AMP plugin on your website, then no redirection is required.

    When a visitor lands on these pages, the query parameter will be ignored, and the browser will load the canonical non-amp page for your visitor.

    In this case, no 404 error will be captured, and you need not worry about duplicate content issues since the page points out the canonical URL.

    Looking forward to helping you.

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

You must be logged in to reply to this ticket.