<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-to-use-https-for-local-development-cesyvvjre" -->

---
title: How to use HTTPS for local development | daily.dev
description: Some APIs that won&#x27;t work on a deployed HTTP site, will work on http://localhost. mkcert is a tool that helps you do this in a few commands. Never export or...
canonical: https://daily.dev/posts/how-to-use-https-for-local-development-cesyvvjre
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How to use HTTPS for local development | daily.dev
og:description: Some APIs that won&#x27;t work on a deployed HTTP site, will work on http://localhost. mkcert is a tool that helps you do this in a few commands. Never export or...
og:url: https://daily.dev/posts/how-to-use-https-for-local-development-cesyvvjre
og:image: https://api.daily.dev/og/posts/cesYVvjRE.png
og:image:alt: How to use HTTPS for local development
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How to use HTTPS for local development

**[web.dev](https://daily.dev/sources/web)** · 112 upvotes · 7 comments

## Summary

Some APIs that won't work on a deployed HTTP site, will work on http://localhost. mkcert is a tool that helps you do this in a few commands. Never export or share the file rootCA-key.pem mkcert creates automatically when you run mkcert -install.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://web.dev/how-to-use-local-https/>

## Community discussion

Top comments from developers on daily.dev.

**@karthik** · 3 upvotes

> Running your site locally with HTTPS using mkcert tool

**@shadow94x** · 2 upvotes

> Nice article! If you need to try https without any configuration ngrok is useful tool as an alternative

**@soubinan** · 1 upvotes

> Great!

**@fatehak** · 1 upvotes

> Localhost HTTPS with mkcert

**@artoo** · 1 upvotes

> wow this is really helpful. I

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 1 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments
- [CNCF Unveils Schedule for KubeCon \+ CloudNativeCon Europe 2026](https://daily.dev/posts/cncf-unveils-schedule-for-kubecon-cloudnativecon-europe-2026-ikhcoa5cb) · CNCF · 2 upvotes · 0 comments
- [CNCF Debuts KubeCon \+ CloudNativeCon Japan 2026 Schedule](https://daily.dev/posts/cncf-debuts-kubecon-cloudnativecon-japan-2026-schedule-xp5pyudub) · CNCF · 1 upvotes · 0 comments

---

Tags: [#general-programming](https://daily.dev/tags/general-programming)

[View this post on daily.dev](https://daily.dev/posts/how-to-use-https-for-local-development-cesyvvjre)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How to use HTTPS for local development","url":"https://daily.dev/posts/how-to-use-https-for-local-development-cesyvvjre","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-to-use-https-for-local-development-cesyvvjre"},"datePublished":"2021-01-26T15:52:04.000Z","dateModified":"2021-10-07T14:17:10.317Z","description":"Some APIs that won't work on a deployed HTTP site, will work on http://localhost. mkcert is a tool that helps you do this in a few commands. Never export or...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/9bc157b967bcfbd471955926fcc9d902","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/9bc157b967bcfbd471955926fcc9d902","isAccessibleForFree":true,"articleSection":"web.dev","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"web.dev","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/177a1962a8a945468271068795ff0134","url":"https://daily.dev/sources/web"},"commentCount":7,"discussionUrl":"https://daily.dev/posts/how-to-use-https-for-local-development-cesyvvjre","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":112},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":7}],"keywords":"general-programming"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"web.dev","item":"https://daily.dev/sources/web"},{"@type":"ListItem","position":3,"name":"How to use HTTPS for local development"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/how-to-use-https-for-local-development-cesyvvjre","comment":[{"@type":"Comment","text":"Running your site locally with HTTPS using mkcert tool","datePublished":"2021-01-26T16:53:03.011Z","url":"https://daily.dev/posts/cesYVvjRE#c-FKmbTHkZH","author":{"@type":"Person","name":"Karthik Intellectual","url":"https://daily.dev/karthik","image":"https://lh3.googleusercontent.com/-9vl1gpzIvbs/AAAAAAAAAAI/AAAAAAAAAAA/AMZuucnqJVqFUF2k1jOxXRMkHKBdsUqfEw/s100/photo.jpg"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3}},{"@type":"Comment","text":"Nice article! If you need to try https without any configuration ngrok is useful tool as an alternative","datePublished":"2021-01-27T08:14:02.216Z","url":"https://daily.dev/posts/cesYVvjRE#c-OeEfL4xGT","author":{"@type":"Person","name":"Nikolas Mosca","url":"https://daily.dev/shadow94x","image":"https://lh3.googleusercontent.com/a-/AOh14GhJs4whloMFg6buGFCGg6D-v0zIHeFsBn1FQgiztg=s100"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2}},{"@type":"Comment","text":"Great!","datePublished":"2021-01-26T17:49:26.524Z","url":"https://daily.dev/posts/cesYVvjRE#c-eCH-ghVy-","author":{"@type":"Person","name":"Soubinan","url":"https://daily.dev/soubinan","image":"https://avatars1.githubusercontent.com/u/20760371?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"Localhost HTTPS with mkcert","datePublished":"2021-01-26T20:03:44.654Z","url":"https://daily.dev/posts/cesYVvjRE#c-cg-Y7ae5Q","author":{"@type":"Person","name":"Fateh AK","url":"https://daily.dev/fatehak","image":"https://avatars1.githubusercontent.com/u/34565559?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"wow this is really helpful. I","datePublished":"2021-01-26T17:45:11.991Z","url":"https://daily.dev/posts/cesYVvjRE#c-sLrlPAjEe","author":{"@type":"Person","name":"aRtoo","url":"https://daily.dev/artoo","image":"https://avatars2.githubusercontent.com/u/19770382?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}}]}
```

