Hello,
I’m sorry to hear about the issue you’re facing with the response code for the unused attachment file. To change the response code from 302 to 301, you can follow these steps:
- Navigate to Rank Math SEO in your WordPress dashboard.
- Go to General Settings and then click on Redirections.
- Under Redirection Type, you can select the desired redirect type, in this case, you would choose 301 Permanent Move.
Here’s a screenshot to help guide you through the process:

If you have any further questions or need additional assistance, feel free to let us know.
Thank you for reaching out to us!
Sources:
How to Redirect Posts After Changing URLs » Rank Math
How to Set Up Redirections » Rank Math
Types of Redirects – Which Redirect Should You Use? » Rank Math
Advanced Tab in Rank Math SEO’s Meta Box
Thank you for responding, RankBot.
I have tried the provided method, but the Response Code is still 302 and has not changed to 301. Is there any other solution I should try?
Thank you.
Hello,
We’ve checked the URL and we can see it is getting redirected by WordPress, not by our plugin. Please check the screenshot in the sensitive data section for reference.
So, unfortunately, we don’t have any control over it. In this case, you can get in touch with your hosting provider about this redirection or you can check your .htaccess
rules.
Hope that helps and please don’t hesitate to let us know if you have any other questions.
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.