Originally published at www.foteinisavvidou.codes
In the previous tutorials, you created and configured a WordPress website hosted on Microsoft Azure, updated the version of PHP and connected to your app using FTP. In this tutorial, you will learn how to map a custom domain name to your website by using a CNAME record.
To complete the exercise, you will need:
- An Azure subscription.
- A WordPress website running on Azure or another Azure App Service app.
- Purchase a domain name and make sure that you have access to the DNS records for your domain provider.
Check the pricing tier of the App Service plan
App Service Free hosting plan does not support custom domains. To connect a custom DNS name to your app, the app’s App Service plan must be a paid tier.
- Sign in to Azure Portal, expand the left navigation panel and select All resources.
- Select the App Service that you have created in the part 1.
- In the left pane, select Scale Up (App Service Plan) in the Settings section.
- If the app is in the F1 tier, select one of the non-free tiers and click Apply. If your app isn’t in the F1 tier, skip this step.
Connect your domain
You can use either an A record or a CNAME record to map a custom DNS name to your App Service. In this tutorial, you are going to add a CNAME record for the www
subdomain.
- In the left pane, select Custom domains under Settings.
- Select Add Custom Domain.
- Type the domain name (www.your-domain.com), make sure that Hostname Record Type is set to CNAME and click Validate.
- To verify domain ownership, create a CNAME and a TXT record in your DNS provider using the following configuration:
- Select Validate again. If the previous step is done correctly, you will see a green checkmark next to domain ownership. This means that you have successfully confirmed your domain ownership.
- Select Add Custom Domain.
Next steps
In the last tutorial of the “Host WordPress on Microsoft Azure” tutorial series, you will learn how to add an SSL certificate to your website using free App Service Managed Certificate. Stay tuned!
Top comments (0)