Ahmad Awais

NAVIGATE


SHARE


Vercel + Cloudflare Domain Setup (formerly ZEIT)

Ahmad AwaisAhmad Awais

I like to host my domains on Cloudflare. It gives me the ability to changes my servers swiftly in addition to the free CDN, SSL, and security benefits. And before I forget, I love the new Analytics offering they have. Much better than client-side solutions.

Setup a Domain with Vercel & Cloudflare#

Vercel (formerly ZEIT) and Cloudflare don’t necessarily go hands and hands on the topic of setting up domains since both of these offer some features that become redundant. Like the CDN, SSL, etc.

So, for future reference, if I forget, writing this post on how to set up the Vercel (formerly ZEIT) and Cloudflare domain using the following steps:

TO CONFIRM#

That’s about it. Vercel (formerly ZEIT) will start processing the SSL certificate for you. For this setup, you’ll keep using your nameservers for Cloudflare and don’t even have to worry about setting up ANAME or whatever.

Use your code for good. 🥁

Founder & CEO of ⌘ Command Code coding agent with taste. Founded Langbase.com, AI cloud to build, deploy, and scale AI agents with tools & memory · Creator of Command.new.

"Awais is an awesome example for developers" — Satya Nadella, CEO of Microsoft.

NASA Mars Ingenuity Helicopter mission code contributor 8th GitHub Stars Award recipient with 5x GitHub Stars Award (Listed as GitHub's #1 JavaScript trending developer). Google Developers Expert Web DevRel.

Ex VP Eng (DevTools & DevRel) Rapid · Google Developers Advisory Board (gDAB) founding member · AI/ML/DevTools Angel Investor (Replit, Resend, Daytona, Gumroad and you?) ❯ AI/ML Advisory Board San Francisco, DevNetwork.

Award-winning Open Source Engineering leader authored hundreds of open-source dev-tools and software libraries used by millions of developers, including Shades of Purple code theme and corona-cli.

Linux Foundation (Node.js Committee Lead), OpenAPI Business Governing Board. Taught 108K+ developers via NodeCLI.com and VSCode.pro course. 274 million views, blogging for 24 yrs.

❯ Read more about Ahmad Awais or come say hi on 𝕏 @_AhmadAwais.

📨

Developers Takeaway

Stay ahead in the web dev community with Ahmad's expert insights on open-source, developer relations, dev-tools, and side-hustles. Insider-email-only-content. Don't miss out - subscirbe for a dose of professional advice and a dash of humor. No spam, pinky-promise!

✨ 172,438 Developers Already Subscribed
Comments 8
  • Arnaud
    Posted on

    Arnaud Arnaud

    Reply Author

    What is the main benefit using Clouflare over Vercel?


    • Ahmad Awais
      Posted on

      Ahmad Awais Ahmad Awais

      Reply Author

      Lots of them. I use my domains to do a lot of things. Not all are offered by Vercel. E.g. redirections, security stuff, and free analytics that I get with Cloudflare.


  • woods
    Posted on

    woods woods

    Reply Author

    Thanks a lot! Your steps are very clear and it’s perfect! One related question pls: the last step, add the in your Vercel’s project settings, there’s a option “redirect to”. It’s weird – the purpose of this whole thing is to redirect to *.now.sh, so isn’t this option redundant?


  • woods
    Posted on

    woods woods

    Reply Author

    Thanks a lot! Your steps are very clear and it’s perfect! One related question pls: the last step, add the ‘mydomain’ in your Vercel’s project settings, there’s a option “redirect to”. It’s weird – the purpose of this whole thing is to redirect ‘mydomain’ to *.now.sh, so isn’t this option redundant?


    • woods
      Posted on

      woods woods

      Reply Author

      I mean, if I check this option and make it redirect to *.now.sh, all links will be like “*.now.sh/*”, so ‘mydomain’ is not linked any more? And more importantly, cloudflare does not interfere any more,.e.g.CDN?


      • Ahmad Awais
        Posted on

        Ahmad Awais Ahmad Awais

        Reply Author

        I don’t understand what you’re trying to ask here. The purpose is to have your own custom domain setup not a redirect.


  • Ralphilius
    Posted on

    Ralphilius Ralphilius

    Reply Author

    This would break any other CNAME not processed by Vercel and can’t provide Cloudflare CA SSL on that server. Do you know how to overcome Full (Strict) setting?

    As an example, I’m hosting on Heroku and Cloudflare made my site secured, but with your setting the subdomain pointing to Heroku no longer works.


  • Armaan A
    Posted on

    Armaan A Armaan A

    Reply Author

    …Wow your post made this infinitely times easier. The problem was with the “Always Use HTTPS” setting for me. Thank you so much for the clear and concise post!


Mentions

  • Armaan A
  • Ralphilius
  • Ahmad Awais
  • woods
  • woods
  • woods
  • Ahmad Awais
  • Arnaud