{"id":293197,"date":"2019-08-06T07:25:07","date_gmt":"2019-08-06T14:25:07","guid":{"rendered":"https:\/\/css-tricks.com\/?p=293197"},"modified":"2019-08-06T07:25:07","modified_gmt":"2019-08-06T14:25:07","slug":"using-your-domain-with-a-netlify-hosted-site","status":"publish","type":"post","link":"https:\/\/css-tricks.com\/using-your-domain-with-a-netlify-hosted-site\/","title":{"rendered":"Using Your Domain with a Netlify-Hosted Site"},"content":{"rendered":"

Netlify has their own docs for Custom Domains<\/a>, so if you’re looking for horse’s mouth technical docs on this stuff, that should be treated as the source of truth. But I’d like to take a crack at it from a slightly different angle, where we look at where you are and what you wanna do, and the point you in the right direction.<\/p>\n

<\/p>\n

Do you NOT own the domain yet?<\/h3>\n

If that’s the case, you can buy it directly through Netlify<\/a> if you want. There is a big advantage there in that it automatically gets set up to work perfectly, so it’s easier.<\/p>\n

\"\"<\/figure>\n

You don’t have<\/em> to buy your domain through Netlify though, you can buy it wherever you like. There is nothing you can’t do with Netlify if you choose to buy a domain elsewhere. <\/p>\n

Easiest possible method:<\/strong> register the domain with Netlify.<\/p>\n

Alternative:<\/strong> If you anticipate some hosting\/DNS churn, like you think you might ultimately need to host elsewhere, it probably makes more sense to manage to domain somewhere agnostic where you can re-point DNS stuff wherever you need to. It’s not that you can’t manage the DNS on Netlify and point it elsewhere, it just doesn’t make loads of sense. Also, there is something to be said (lower cognitive load) managing all your domains in one place if you can.<\/p>\n

What if you already own the domain?<\/h3>\n

No problem. The rest of this article deals with that scenario.<\/p>\n

Are you cool pointing the nameservers at Netlify?<\/h3>\n

If you are, this is the best way. It means you don’t have to fiddle with subdomains and the CDN features work the best. The requires you to go into the DNS administration area of wherever you bought the domain and change the nameservers there. Every domain registrant will be a bit different in where and how you do that.<\/p>\n

\"\"
Changing nameservers on GoDaddy to point to Netlify.<\/figcaption><\/figure>\n

Can’t or don’t want to point nameservers at Netlify?<\/h3>\n

I would guess that the main reason you might have this preference is that you use Cloudflare<\/a>, or perhaps something else similar that gives you fancy performance and security advantages by going through their proxy. Netlify actually says<\/a> that you don’t need Cloudflare with them, because many of the main advantages of Cloudflare Netlify already provides.<\/p>\n

Technology is a moving place though, and it’s entirely possible that you need or really want some feature that a proxy service like Cloudflare provides. <\/p>\n

If you need to do this, you’ve got two options:<\/p>\n