Hello,
We apologize for the issue you are facing with redirecting your URL attachment. To redirect an attachment like a PDF file in Rank Math, you need to ensure that you have set up the redirection correctly. Here are some steps to follow:
-
Check the Redirects: Go to WordPress Dashboard → Rank Math SEO → Redirections and verify that the source URL (the old PDF) and destination URL (the new PDF) are correctly entered.
![Redirections](https://rankmath.com/wp-content/uploads/2021/06/rank-math-redirections.png)
-
Use 301 Redirect: Make sure you are using a 301 redirect for permanent redirection. This is important for SEO and ensures that visitors are taken to the new URL.
![Create new redirection](https://rankmath.com/wp-content/uploads/2022/06/Create-new-redirection.png)
-
Clear Cache: If you are using any caching plugins, clear the cache after setting up the redirect. Sometimes, cached pages can prevent the new redirects from working properly.
-
Check for Conflicts: Ensure that there are no other plugins or settings that might be conflicting with the redirection.
-
Test the Redirect: After setting everything up, test the old PDF URL in your browser to see if it redirects to the new one.
If you have followed these steps and it still doesn’t work, please reply to this ticket, and a human agent from the Rank Math Support team will take over and assist you further.
Thank you for raising this concern!
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.
Unfortunately, I have done all of these things, but it still doesn’t work.
Hello,
Unfortunately, our plugin doesn’t support redirecting the pdf files. You will have to use the .htaccess
file for such redirections. Here is a guide that can help: https://karenattfield.com/redirect-pdf-wordpress/
Here’s how you can edit the .htaccess
file using Rank Math:
https://rankmath.com/kb/edit-htaccess/
Please do take a backup before editing your .htaccess file.
Hope that helps and please don’t hesitate to let us know if you have any other questions.
Thank you.