Migrating from Namecheap to Azure

I’ve spent a number of years hosting my websites on Namecheap. Their prices were very reasonable and the customer support was excellent. Over time though I’ve been doing increasingly ambitious projects on Azure, as well as working to divorce myself from all things Google. Early this year (2019) I finally decided to consolidate all of my web properties on the Microsoft stack. Spending hours with Customer support trying to identify mystery DNS servers, ever changing hosting servers, multiple cpanels, and a half dozen other minor nuisances finally became too much. “Just give me direct server access, I’ll do it myself”. Below you can see the steps I took to transfer some of my domains to Azure.

# Caveats

I followed these steps in February of 2019. There was no user interface available nor documentation on how to do it. A user interface is in the works and by the time you read this post it may already exist. Do look for it before trying to follow in my footsteps. This is a Dark Art.

Note that this will only work for a limited number of TLDs. According to Microsoft documentation:

Azure domain transfer TLD restriction

In this post I am only going to show the steps I used to transfer a domain without an associated mail server, database, or any other resource tied to it. This was a simple flat file website used as a placeholder for future work. If you have a more complicated site with dependencies then use this guide as a supplement for other guides. I offer no guarantee that these steps will work for you as the interfaces and APIs will change.

If you come across an issue not covered here, you should follow the normal support channels such as Stack Overflow, Microsoft Azure support, or Namecheap support as appropriate.

I also don’t see a reasonable way to avoid downtime with this method, but you might be able to keep it to a minimum depending on how you manage redirects, SSL certificate migrations, and DNS settings during the transfer.

# Prerequisites

  • Azure Subscription
  • Azure Resource Group

You would be wise to migrate your other resources to azure first before moving the domain to mitigate risk and down-time. Setup appropriate redirects, DNS settings, and so on first before migrating the domain.

The SSL guide for Azure is relatively straightforward. You can see this and others in the References section below

# Transferring out of Namecheap

Step 1: Navigate to the Namecheap dashboard

Namecheap Dashboard

Click the “Manage” button next to the domain you want to transfer

Step 2: Unlock Domain and obtain Auth Code

Under the “Transfer Out” section you’ll see a link to “UNLOCK” the domain. After unlocking, click the “AUTH CODE” button.

Namecheap Transfer Out

This will open a popup. Fill in the feedback.

Namecheap Feedback

You’ll then see a confirmation on where it emailed the code.

Namecheap Authcode Email

Check your inbox. You’ll see a confirmation email:

Namecheap Authcode Inbox

Remember this authcode.

# Transferring into Azure

Microsoft does not document how to do this. I suspected it was possible though because 2 years earlier (Aug 2017) I saw a short video on Channel9 that said this was a planned feature. After browsing around the Azure portal for a couple hours there was nothing to be seen. There are a few posts around the internet about using a few varieties of powershell scripts, but they don’t seem to work (bitrot?). Azure has a REST API though that will do the trick. Go to the Domains – Create Or Update page, and click “Try It”

Azure REST Try It

You may be prompted to sign-in to your Azure account. Fill in the mandatory fields. The “api-version” field already has a default value defined:

Azure REST domain transfer info

In the JSON object add your information, the auth code from the earlier email, and consent information.

Azure REST domain transfer body

Remember, this is JSON, so if your auth code has a character such as \ in it you’ll have to escape it: \\

You can generate a timestamp in your browser console or scratchpad for use in the “agreedAt” field

Azure REST domain transfer date

The “agreedBy” field is the Client IP address according to the docs. You can obtain this in a number of ways. Such as https://duckduckgo.com/?q=what+is+my+ip&t=hk&ia=answer

The “agreementKeys” were left as the default values. After a little digging they stand for the following. I can’t find a link for the proper DNTA one at the moment. It might be the GoDaddy one as Azure has a partnership with them. Let me know if you know the proper link and I’ll update this page:

Name Definition
DNPA Domain Name Proxy Agreement
DNTA Domain Name Transfer Agreement

Hit the run button and you should get a 202 message:

Azure REST API Domain Transfer Run Ok

You might also get an error like I did:

Azure REST API Domain Transfer Run Fail
  "error": {
    "code": "MissingSubscriptionRegistration",
    "message": "The subscription is not registered to use namespace 'Microsoft.DomainRegistration'. See https://aka.ms/rps-not-found for how to register subscriptions.",
    "details": [
        "code": "MissingSubscriptionRegistration",
        "target": "Microsoft.DomainRegistration",
        "message": "The subscription is not registered to use namespace 'Microsoft.DomainRegistration'. See https://aka.ms/rps-not-found for how to register subscriptions."

This is how I resolved that:

Azure Resource Providers
Microsoft Domain Registration
Microsoft Domain Registration

Then try to run the API command again:

Azure REST API Domain Transfer Run Ok

Navigate to the Azure Resource Group and you should see a new entry

Azure new domain

Open the resource and you’ll see a “Pending” message at the top:

Azure new domain details

Now you play the waiting game. I only had to wait an hour or so, but I wouldn’t be surprised if this takes longer. Namecheap sent the following email:

Namecheap confirmation details

Now this email is Bullshit. I waited a week and nothing happened. You have to click the link to CANCEL the transfer. See the comment from Namecheap support:

Namecheap confirm support
Namecheap Azure Domain Transfer Request

After clicking Approve, go back to Azure and wait. This could take awhile. I only had to wait an hour or so, but according to the message it could take days…

Azure App Service Domain Registered

# Post-Transfer

After transferring the domain, the next steps are verification, especially your SSL certificate and DNS settings. You can see a guide on how to do this in the references section below along with other guides that may be useful.

# References


You can create, reply to, and manage comments on GitHub