• Resolved cjeremis

    (@cjeremis)


    I have an issue with the redirection plugin sending 301 redirects to http, instead of https, for certain user agents.

    For example, if you go to this URL https://www.55places.com/rhode-island?page=1 in chrome, using default user-agent, it redirects to the https protocol.

    Upon inspection, I can see that this url is being redirected to http with other user agents, ie. “Googlebot Smartphone”

    I need to ensure that the redirection tool is sending the page to https://www.55places.com/rhode-island directly, instead of sending them to http first.

    Currently, redirection plugin sends the redirected URL to an http protocol, then WP and Cloudflare are both set to rewrite to https. We are losing page rank potential due to this double redirect and need to URL to avoid the http redirect.

    The page I need help with: [log in to see the link]

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author John Godley

    (@johnny5)

    Unless you have specifically configured the plugin to do this it does not sound like something it is doing. The plugin will always redirect the same regardless of user agent.

    The likely cause is that something has been cached, or something else is performing the redirect.

    Thread Starter cjeremis

    (@cjeremis)

    I understand and this is where we looked. Disabling the redirect in Redirection stops the redirect, enabling it starts the redirect again.

    https://drive.google.com/file/d/1ui9agW33QAieOvINzuf4Ol7HdHKYpLHu/view?usp=share_link

    I am forcing https in the redirect to ensure it goes to https. However, I still get the http redirection in the crawl.

    https://drive.google.com/file/d/1hrwjaom8L_416GgEvkBqgMdMIeNSnCMh/view?usp=sharing

    If I disable the redirect in redirection plugin then it stops redirecting… The only redirection that is happening to this URL is the Redirection Plugin.

    Please see the images above, the first is my setting in Redirection Plugin, the second is the crawl that shows it is a 301 redirect to an http page…

    Plugin Author John Godley

    (@johnny5)

    Your regular expression looks very strange. Does that actually match?

    The second screenshot is not Redirection.

    Thread Starter cjeremis

    (@cjeremis)

    It has 230 hits and in my chrome browser with default agent, the redirect performs as intended… it seems to be happening with the “Googlebot Smartphone” user-agent only right now. But this is the most important one, as it is pulling down our page rank due to multiple redirects.

    Thread Starter cjeremis

    (@cjeremis)

    You commented “The second screenshot is not Redirection.”, I’m not sure what you mean. Do you mean this is not the redirection plugin doing this, or do you mean that this is not a redirection happening on the URL?

    Plugin Author John Godley

    (@johnny5)

    You can simplify that to just being a plain redirect with the ‘ignore trailing slash’ option enabled. There is no need for it to be a regular expression.

    I mean that Redirection is not performing the redirect.

    Thread Starter cjeremis

    (@cjeremis)

    Basically, anything with
    rhode-island/?page=1
    OR
    /rhode-island\{any_other_page}\?page=1

    Should all redirect back to the parent page
    /rhode-island

    Without the ?page parameter…

    Thread Starter cjeremis

    (@cjeremis)

    Can you explain more how to set this up to do the simple redirect with the “ignore trailing slash”? I’m not a regex expert or with the Redirection Plugin. If you could point me in the right direction that would be great. We have over 600 of these setup and I will need to update each of them individually or with a DB update.

    If redirection is not performing that redirect, what else could be? When I disable this redirect in the Redirection Plugin, the redirect stops, the only redirect I see is from the plugin…

    Plugin Author John Godley

    (@johnny5)

    /rhode-island\{any_other_page}\?page=1

    I don’t think it will match that. Your regex matches /rhode-island/?page=1 and /rhode-island?page=1. You can find more details of regular expressions here: https://redirection.me/support/redirect-regular-expressions/

    If redirection is not performing that redirect, what else could be?

    I couldn’t say. There is no code in Redirection to target the user agent you mentioned, and no one else has raised this as an issue. Redirection will always identify itself in the response, and your screenshot does not show that identification. The cause is probably something to do with Cloudflare and you may find that clearing the cache helps. You could also try temporarily disabling it to see if the problem goes away.

    Thread Starter cjeremis

    (@cjeremis)

    Right you are correct, this is the intended behavior. The issue is only that the redirect is going to http, instead of http. I just purged the cache on WP Engine and Cloudflare and still getting the same results. Tried disabling Cloudflare Caching and still the same result…

    Any other ideas? This is the only location we have redirects setup/managed… in the Redirection Plugin

    Plugin Author John Godley

    (@johnny5)

    This is the redirect from Redirection:

    HTTP/2 301
    date: Wed, 08 Mar 2023 18:03:25 GMT
    content-type: text/html; charset=UTF-8
    location: https://55places.com/rhode-island
    cf-ray: 7a4cfea6fd9571b4-LHR
    cache-control: max-age=600, must-revalidate
    expires: Wed, 11 Jan 1984 05:00:00 GMT
    cf-cache-status: BYPASS
    cf-apo-via: origin,qs
    cf-edge-cache: cache,platform=wordpress
    pragma: no-cache
    x-cache: MISS
    x-cache-group: normal
    x-cacheable: non200
    x-orig-cache-control: no-cache, must-revalidate, max-age=0
    x-powered-by: WP Engine
    x-redirect-by: redirection
    server-timing: cf-q-config;dur=4.9999998736894e-06
    report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=ArKc8gXRzaIma4PcJEDDHcW1Jhh0s%3D"}],"group":"cf-nel","max_age":604800}
    nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
    server: cloudflare
    alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400

    This is the one that is different:

    HTTP/2 301
    date: Wed, 08 Mar 2023 19:29:48 GMT
    content-type: text/html
    location: https://www.55places.com/rhode-island
    cf-ray: 7a4d7d330fd675de-LHR
    cf-cache-status: BYPASS
    cf-apo-via: origin,qs
    server-timing: cf-q-config;dur=6.9999987317715e-06
    report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=giJ9k3RnsOPi4xXJ%2FzQ%2FA7OKLLBxc%3D"}],"group":"cf-nel","max_age":604800}
    nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
    server: cloudflare
    alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400

    You can see how different it is. I do not use Cloudflare and do not know how it works. You may want to talk to them for further help, or maybe even WP Engine.

    Plugin Author John Godley

    (@johnny5)

    To follow up, the same incorrect response is received even if the URL does not match. For example https://www.55places.com/rhode-island?page=1&v=1 does not match the redirect but returns the same http response. To me it seems like you have created a redirect somewhere else.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Redirecting to HTTP’ is closed to new replies.