• Resolved BupNup

    (@bupnup)


    Hi,

    I’m redirecting an old domain to a new domain using Regex.
    Source: ^/(.*)
    Target: https://newdomain.com/$1

    But when I try to access https://www.olddomain.com, I’m not redirected to the matching page in the new domain. Instead, I get a “Your connection is not private” message and a “NET::ERR_CERT_COMMON_NAME_INVALID.”

    It only happens when I add the www.

    What am I doing wrong?
    Can you help?
    Thanks

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

    (@johnny5)

    Do you have an SSL certificate for the www domain? The plugin cannot resolve those kind of problems for you and the domain will need to be valid.

    Thread Starter BupNup

    (@bupnup)

    I do. Actually, everything works fine with the old domain if I disable the redirect. I’m using Cloudways for hosting and enabled the Let’s Encrypt certificate.

    I also use Cloudflare for DNS and have the SSL/TLS set to full.
    It just happens when I have the redirect enabled and add the www to the URL.

    The only plugins I have installed on this WordPress installation are the Redirection plugin and a Cloudways Bot protection plugin.

    Plugin Author John Godley

    (@johnny5)

    I don’t know what those Cloudways/Cloudflare things are, so cannot comment there.

    Do you have a full URL for the one showing an error?

    Thread Starter BupNup

    (@bupnup)

    Hi John,

    Thank you for your time. I just solved the issue.
    In fact, I didn’t have the certificate for the www subdomain installed.

    For anyone in the future experiencing the same issue I had, all you have to do is install the let’s-encrypt certificate with wildcard enabled.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Regex ^/(.*) www problems’ is closed to new replies.