Hello,
Thank you for reaching out to us. To configure the attachment pages to open instead of redirecting to a post or image, you can follow these steps:
- Head over to Rank Math SEO → General Settings → Links inside your WordPress dashboard.
- Enable the Redirect Attachments option.
- Click the Save Changes button at the bottom of the page.
After enabling the Redirect Attachments option, you will be able to redirect your attachment pages directly to the media URLs. If you have any further questions or need assistance with this process, please feel free to reach out to our support team directly from here: Rank Math Support.
We’re here to help!
Sources:
Why You Shouldn’t Duplicate Posts/Pages » Rank Math
Should You Redirect Attachment Page URLs? » Rank Math
How to Redirect Attachments to the Media URL with Rank Math » Rank Math
How to Configure Sitemaps in Rank Math – Best Settings and Tips
I don’t want to redirect to the attachment URL (e.g. image.jpg), but to the attachment page where the entire page and the image are displayed.
Hello,
Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.
If your attachment pages are getting redirected, please head over to your WordPress Dashboard > Rank Math > General Settings > Links, and from there disable the Redirect Attachments option:

Let us know how it goes. Looking forward to helping you.
Thank you.
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.