Hello,
Thank you for your query and we are so sorry about the trouble this must have caused.
If you want to follow the procedure on that tutorial you need to create the file called rank-math.php
inside your theme to add the code.
This file can be created with FTP access or by going to the file manager on your domain management panel provided by the hosting provider.
Don’t hesitate to get in touch if you have any other questions.
Thank you, Miguel.
I followed the instructions but got the error while clicking ‘update’. https://imgur.com/a/NMyb5r7
I uploaded the file to Astra theme, or should I do it in ‘Astra child’.
Thank you!
Hello,
The file should be uploaded to the child theme but you also need to have an opening PHP script tag before anything else on the file.
That tag is the following:
<?php
Don’t hesitate to get in touch if you have any other questions.
Hello,
The image URLs you’ve shared are not the attachment URLs, these are the direct file URLs of the images and they shouldn’t redirect to the original post or the page.
You can check the attachment URL of this image from your WordPress Dashboard > Media:

Hope that helps and please don’t hesitate to let us know if you have any other questions.
Thank you.
Hello,
We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.
If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.
If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.
Thank you.