Cannot change Custom Domain Page URLs in Azure App Service WordPress

Prince Nema 0 Reputation points
2024-10-01T19:53:58.57+00:00

I have successfully configured a custom domain for my WordPress site hosted on Azure App Service, but I'm facing an issue with new pages. Despite the custom domain being set up and functioning correctly, newly created pages still resolve to the old Azure domain (XXX.azurewebsites.net/newpage) instead of my custom domain (custom-domain/newpage).

In the WordPress settings, the "Site URL" field is greyed out, preventing me from making any changes. I attempted to modify the wp-config.php file to hardcode the custom domain, but this caused the site to break, so I reverted the changes.

P.S I also came around this admin panel custom-domain/wp-admin/ and here the new page pointing correctly custom-domain/newpage but in live site it is still azurewebsites.net/page.

Has anyone experienced this issue or any idea how to resolve it? Thank you

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

1 answer

Sort by: Most helpful
  1. ajkuma 28,036 Reputation points Microsoft Employee Moderator
    2024-10-03T18:58:37.1433333+00:00

    Prince Nema, Apologies for the delayed response.

    Based on my understanding of your issue description, where the custom domain isn't properly reflected in the URLs of newly created pages, and I see that you have tried multiple steps to isolate the issue:

    In some cases, the URLs are stored in the database and need to be updated.

    Check for any plugins that might be causing redirects or conflicts with the custom domain. (if you haven't done) - You may consider to disable such plugins temporarily can help identify the root cause.

    1. Login to WordPress Admin

    2. Click on Settings -> General

    3.Find the WordPress Address (URL) and Site Address (URL) fields:

    4.Update it to your new URL as shown:User's image

    5.Save Changes

    Ref: WordPress: Redirecting to wrong URL

    Kindly let us know how it goes. I'll follow-up with you.

    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.