Sachin Chaurasiya
Sachin Chaurasiya
All tools

Code & ship

Netlify

Hosting a static site with a preview link for every pull request

DailyLast checked

I use it every week, right now.

This site runs here. Every PR gets its own preview link, and all the redirects live in one file.

Use it when

  • You host a static or mostly static site, like Astro
  • You want a preview link for every pull request

Skip it when

  • You need a long-running server
  • You can't risk a free site going offline when credits run out

Hear when my tools change

No schedule, no filler. I send one email when I add a tool, drop one, or publish a new article.

You'll get one email to confirm. Unsubscribe anytime. Privacy

How I use it

  • One config file. netlify.toml holds the build command, about 30 redirects and a few headers.
  • Moving a blog. My old blog address is a domain alias on this site. Redirect rules send every old post address to its new home under /blog, so old links keep working.
  • Deploy previews. Every pull request gets its own link. I read changes there before merging.
  • Headers. Plain-text copies of posts get a noindex header, so search engines only show the real pages.

Getting started

  1. For a static Astro site you need no adapter. Commit a netlify.toml with command = "npm run build" and publish = "dist".
  2. Install the CLI and log in: npm install -g netlify-cli, then netlify login.
  3. Run netlify init to connect your repo. Every push to main deploys, and every PR gets a deploy-preview-<n> link.
  4. Add your domain under Domain management.

Tips that save time

  • For a whole old domain, use a forced redirect: 301! in _redirects or force = true in netlify.toml. Without it, a real file at the old path wins over your rule.
  • You can’t add or remove a trailing slash with a redirect rule. It loops. Use the Pretty URLs setting instead.
  • Previews don’t spend deploy credits, but each production deploy costs 15. On the Free plan, batch your merges.
  • $MY_VAR inside netlify.toml is not replaced with its value. Set secrets in the dashboard or CLI.

Watch out for

  • The Free plan’s cap is hard. When the 300 credits run out, every site on the team goes offline until the next cycle.
  • New free projects show a “Powered by Netlify” badge by default. You can turn it off per project.
  • New teams start with private projects. Visitors need a Netlify login until you make the project public.

Pricing

Free has 300 credits a month as a hard cap. Personal is $9/month, Pro is $20/month. A production deploy costs 15 credits; previews don't cost deploy credits. Checked Dec 5, 2026. Current prices

History

  1. Nov 2026DailyRebuilt this site in Astro, still hosted here

No referral links on this page. No paid placement, no other tie to the maker. How I pick tools.