• Resolved rafaviana

    (@rafaviana)


    Hello!
    I’ve enable the “Redirect attachment URLs” feature but when I visit an attachments permalink page, I got a 404 page. It should redirect to the attachment URL.

    I already tried to disable all the plugins, enable default theme and regenerate htaccess but no success.

    Any idea how to fix it?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Michael Ti?a

    (@mikes41720)

    Hi @rafaviana

    When you enable the ‘redirect attachment URLs to the attachment itself’ feature, it should redirect the attachment page to the attachment itself – https://yoast.com/help/redirect-image-attachment-urls/

    Could you provide us with an example URL of one of your attachment pages?

    Thread Starter rafaviana

    (@rafaviana)

    Plugin Support Md Mazedul Islam Khan

    (@mazedulislamkhan)

    We have tested the relevant PDF page by embedding it on a fresh WordPress installation and when we went to the view attachment page option from the media library, we can confirm that Yoast SEO was redirecting to the actual .pdf file instead of showing the media (attachment) page.

    So, please make sure that you embedded the relevant PDF to a page and make sure the https://www.pousadela.pt/menu/ page is the exact media (attachment) page for the relevant PDF file (it doesn’t look like it to us).

    Thread Starter rafaviana

    (@rafaviana)

    Hi, I’m sure the attachment page has the PDF embed to it. I also added a new PDF to the media library and tested without change anything, please take a look to this video: https://www.awesomescreenshot.com/video/4734826?key=afb8f14b5d79ea26edf36de98fbae2d6

    Plugin Support devnihil

    (@devnihil)

    @rafaviana Thanks for your reply.

    If the redirect to attachment feature isn’t working as expected, it could be the result of either the site/server cache, or another plugin/theme interfering with the redirect functionality.

    If you clear your cache (server, plugin/theme, browser, or CDN such as Cloudflare) does this resolve the issue? If you are not sure how to clear your server cache you should speak with your host provider. We have information on how to clear your browser cache at the following link: https://yoast.com/help/how-to-clear-my-browsers-cache/.

    If you have cleared all caches and confirmed both WordPress, Yoast SEO, and all of your site’s other plugins and themes are up to date and the problem is still occurring, we would next recommend performing a conflict check. A plugin or theme conflict can sometimes cause functionality problems, errors, or unexpected behavior from the plugin. If you are unfamiliar with checking for conflicts, we have a step by step guide on how to check for conflicts available here: How to check for plugin conflicts.

    Test this on your development or staging site, if you have one. If not, we recommend using the?Health Check & Troubleshooting?plugin. This plugin allows you to run a conflict check?without affecting normal visitors to your site.

    Can you please confirm you have performed a complete conflict check by disabling other plugins, and resetting the theme to a default such as TwentyTwentyOne and let us know the results?

    If you do not feel comfortable to do this yourself or if this does not solve your issue, our Yoast SEO Premium plugin comes with one year of (technical) support.

    Thread Starter rafaviana

    (@rafaviana)

    Thank you for your help. I installed Health Check & Troubleshooting plugin and run conflict checker mode. I discovered the reason why this is happening, if Elementor Landing Pages experiments is enabled, the attachment URL doesn’t redirect to the file page.
    I disabled that option on Elementor settings and now it works fine: https://tinyurl.com/yjynv3ps

    Thank you for your help!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Redirect attachment URLs not working’ is closed to new replies.