This article was posted over a year ago. The information below could be outdated.
I’ve been playing around with Now deployment for a few months. First I thought about Now is magic, with only a small configuration (in v2) I can deploy a static website easily, now I can deploy (with default template) any static website without any configuration. That’s amazing.
How to Deploy
First thing, you need a Vercel account, of course. Next, if you use one of the templates from this list, congratulation, you only need to execute
now from the project root, something like this.
cd my_project now
That’s it. For the rest let Now do the work.
After your project has been deployed, you will be provided with a link to the Preview Deployment, this can be shared immediately.
How to Use Cloudflare with Now
Vercel has internal domain management, so you can directly buy domains inside the Vercel dashboard. But if you want to set up a domain setting using Cloudflare so you can set cache or other, this is also simple. You just need to register some DNS and encryption settings.
Add DNS Records
To connect Cloudflare with Vercel, you need to add
CNAME a record with an alias of
alias.zeit.co so its traffic is proxied through Cloudflare. Next, register the domain to the Vercel account using
now domains add your-domain-name.com
when adding the domain success, you will get a verification code for further to fill
TXT record with name
After all, records have been created, you need to verify the domain using
now domains verify your-domain-name.com
Make HTTPS Works
To make HTTPS works you need to change Cloudflare’s encryption mode to Full (strict) and then create page rules to make Enforce HTTPS for this domain:
- Go to page “Create Page Rule”
- Add new page rules with a configuration like this:
The settings are: Always Use HTTPS
- Save and Deploy
Make Deploy Automatically
If your project source code is hosted on GitHub, GitLab or Bitbucket, Vercel has tools to integrate with deployment, so when you push code to the specific branch, Vercel will automatically detect changes and make a deployment. For more information, jump up to Vercel documentation.
This post has been updated with the latest update from Vercel (formerly ZEIT)