My www.XXXX is getting error 301 redirect in wordpress

Oluwaseun Osinuga 1 Reputation point
2020-12-18T07:48:21.623+00:00

I have a WordPress site hosted on azure but recently when I visit the www.XXXX I am getting 301 redirect error. But when i access the naked domain it works fine.

I bought an Azure App service certicate that is linked to both subdomain and naked domain, DNS records also looks fine. I don't understand why all of a sudden www subdomain keeps getting 301 redirects

Kindly assist.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,055 questions
{count} votes

2 answers

Sort by: Most helpful
  1. N-M6541 1 Reputation point
    2022-08-11T16:29:41.47+00:00

    In the Azure portal, from the left menu, select App Services > <app-name>. From the left navigation of your app, select TLS/SSL settings > Private Key Certificates (.pfx) > Create App Service Managed Certificate. Select the custom domain to create a free certificate for and select Create.

    0 comments No comments

  2. Haseeb Alam 5 Reputation points
    2023-06-26T13:50:44.0033333+00:00

    Ensure the preferred domain includes the www subdomain.

    Check the DNS configuration to ensure the CNAME or A record for the www subdomain is correctly pointing to your Azure App Service.

    Check any rewrite rules or redirect configurations affecting the www subdomain.

    Check SSL certificate is properly set up for both the naked domain and the www subdomain.

    Follow above test it might resolve your issue.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.