My www.XXXX is getting error 301 redirect in wordpress

Oluwaseun Osinuga 1 Reputation point

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.
6,846 questions
{count} votes

2 answers

Sort by: Most helpful
  1. N-M6541 1 Reputation point

    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

    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