azurewebsites.net domain indexed in google

Wenyuan Ho 20 Reputation points
2023-11-29T02:00:40.96+00:00

Hi,

We hosted Wordpress website via Azure with our own custom domain. However, when we tried to google search the website, it is shown as "**.azurewebsites.net" instead as ".customdomain".

Please kindly guide / advise us on how to prevent / remove the google indexing the azurewebsites.net. When others search our company, it will only display the custom domain on google search results.

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

Accepted answer
  1. ajkuma 22,411 Reputation points Microsoft Employee
    2023-11-29T07:22:50.5166667+00:00

    @Wenyuan Ho ,

    Firstly, App Service support HTTPS on *.azurewebsites.net domain name and the certificate is provided and owned by Azure.

    I understand the requirement of removing the default domain, but there is no way disable it. You could instead accomplish this by adding a rewrite rule (Or Redirect rule).

    A rule to detect if the user has accessed the website using the Azure default domain and issue a HTTP 301 or 403.  

    Also, ensure that you have changed the site address from mydomain.azurewebsites.net to mydomain.com. from the WordPress settings

    Just to highlight, by default, http://yourdomain.azurewebsites.net works even with custom domain added, and the site admins aware about the URL can access, but typically end users would not access this URL directly (unless explicitly shared).

     

    Reference on other approaches outlined in the similar discussion threads:

    Additionally,

    Azure App Service on Linux images using PHP 8.x are now bundled with NGINX instead of Apache.
    NGINX Rewrite Rules for Azure App Service Linux PHP 8.x


0 additional answers

Sort by: Most helpful