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, the most used coding agent for open models: 160K+ users, 50K+ paying customers. Founded Langbase (AI cloud for agents with memory & tools).

"What an awesome example for developers." — Satya Nadella, CEO of Microsoft, on my NASA Ingenuity code.

NASA Ingenuity Mars Helicopter code contributor · 6× GitHub Star, one of the first 8 Gold Stars · #1 trending JavaScript developer on GitHub · 6× Google Developer Expert · 6× Microsoft MVP.

Ex VP DevRel & DevTools at RapidAPI · Google Developers Advisory Board (gDAB) founding member · OpenAPI Business Governing Board, Linux Foundation · SF DevNetwork AI/ML Advisory Board · Angel investor (Replit, Resend, Daytona, Gumroad and you?).

Award-winning open source engineering leader: 300+ projects, 50–100M downloads a year, including Shades of Purple (5M+ developers) and corona-cli (10B+ queries).

Taught 217K+ developers via NodeCLI.com and VSCode.pro. 160+ talks. Blogging since 2000, billions of views.

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

Newsletter

The Developer Takeaway

Founder notes on AI, dev tools, and building developer products. No spam.

247,813+ developers 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!