• Resolved jayervilha

    (@jayervilha)


    Hi there,

    We have an issue where Yoast is redirecting a page to an attachment URL. Here’s an example with made-up URLs:

    https://domain.com/page 301 redirected to http://domain.com/wp-content/uploads/2020/03/image.png

    Here’s what we’ve gathered from the logs:

    curl -IL
    HTTP/2 301
    date: Thu, 16 Jul 2020 13:56:38 GMT
    content-type: text/html; charset=UTF-8
    content-length: 0
    set-cookie: __cfduid=d351ce95144a140d9a78b03f1b31fe64a1594907798; expires=Sat, 15-Aug-20 13:56:38 GMT; path=/; ; HttpOnly; SameSite=Lax
    expires: Thu, 16 Jul 2020 14:45:50 GMT
    pragma: no-cache
    x-redirect-by: Yoast SEO
    location:
    x-powered-by: WP Engine
    x-cacheable: non200
    cache-control: max-age=600, must-revalidate
    x-cache: HIT: 4
    x-cache-group: normal
    cf-cache-status: DYNAMIC
    cf-request-id: 03f982c21d00009a50a99e3200000001
    expect-ct: max-age=604800, report-uri=””
    server: cloudflare
    cf-ray: 5b3c3a49ccb19a50-MFE

    HTTP/2 200
    date: Thu, 16 Jul 2020 13:56:38 GMT
    content-type: image/png
    content-length: 3637
    set-cookie: __cfduid=d351ce95144a140d9a78b03f1b31fe64a1594907798; expires=Sat, 15-Aug-20 13:56:38 GMT; path=/; ; HttpOnly; SameSite=Lax
    last-modified: Sat, 29 Jun 2019 09:51:34 GMT
    etag: “5d1734a6-e35″
    cache-control: public, max-age=86400
    cf-cache-status: REVALIDATED
    accept-ranges: bytes
    cf-request-id: 03f982c34200009a50a99eb200000001
    expect-ct: max-age=604800, report-uri=””
    server: cloudflare
    cf-ray: 5b3c3a4b9e489a50-MFE

    Removed URLs for privacy.

    Where can we remove this redirect? We have the free version of Yoast installed (and always have).

    We’ve searched the KB and other people’s posts but couldn’t find a solution that fits our scenario.

    Thanks
    Alex

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi Alex,

    It looks like the page that is being redirected is an attachment page. Is this correct? WordPress automatically generates attachment pages for uploaded images.

    Please know that Yoast SEO redirects these attachment pages to the image file by default since these pages usually don’t have any useful information and they’re not necessary for images to be indexed by search engines.

    If this is the cause of the redirect, you can disable it by going to SEO > Search Appearance > Media, then set “Redirect attachment URLs to the attachment itself” to “No”.

    Thread Starter jayervilha

    (@jayervilha)

    Hi Priscilla,

    That is not correct.

    The page (a regular page) is redirecting to an attachment page. Please read through my original post.

    https://domain.com/page 301 redirected to http://domain.com/wp-content/uploads/2020/03/image.png

    What you’re describing is not what’s happening at all in this case.

    Thanks
    Alex

    Hi @jayervilha ,

    We are sorry for the redirect issue you are having. We are not certain why the free Yoast SEO would redirect a certain page as there is no redirect feature on the free plugin. If you disable Yoast SEO, does the page get redirected still? Have you cleared your cache (theme, server, CDN such as Cloudflare, etc)?
    Have you tried performing a conflict check?
    Also, have you checked what’s in your .htaccess file?

    Hi @jayervilha ,

    We’re closing this thread because we haven’t heard back from you in a while. Should you have further questions, please open a new thread.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Yoast causing 301 redirect’ is closed to new replies.