{"id":104,"date":"2024-01-23T12:00:02","date_gmt":"2024-01-23T06:30:02","guid":{"rendered":"https:\/\/successrouter.com\/tech\/?p=104"},"modified":"2024-01-23T12:00:03","modified_gmt":"2024-01-23T06:30:03","slug":"how-to-install-devlocalhost-certificate-on-windows","status":"publish","type":"post","link":"https:\/\/successrouter.com\/tech\/how-to-install-devlocalhost-certificate-on-windows\/","title":{"rendered":"How to install dev(localhost) certificate on windows"},"content":{"rendered":"\n<p>If you want to run localhost in https protocol, you must need to install the localhost certificate in LocalMachine region. To do the same &#8211; execute below command from powershell(admin mode)<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>dotnet dev-certs https &#8211;trust<\/strong><\/p>\n\n\n\n<p>verify if the certificate install has happend in the CurrentUser region or LocalMachine(Computer) region<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"448\" height=\"430\" src=\"https:\/\/successrouter.com\/tech\/wp-content\/uploads\/2024\/01\/image.png\" alt=\"\" class=\"wp-image-105\" srcset=\"https:\/\/successrouter.com\/tech\/wp-content\/uploads\/2024\/01\/image.png 448w, https:\/\/successrouter.com\/tech\/wp-content\/uploads\/2024\/01\/image-300x288.png 300w\" sizes=\"(max-width: 448px) 100vw, 448px\" \/><\/figure>\n\n\n\n<p>If you could something like below in &#8220;Personal&#8221; section of &#8220;Manage computer certificate&#8221; then all good to go<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"28\" src=\"https:\/\/successrouter.com\/tech\/wp-content\/uploads\/2024\/01\/image-1-1024x28.png\" alt=\"\" class=\"wp-image-107\" srcset=\"https:\/\/successrouter.com\/tech\/wp-content\/uploads\/2024\/01\/image-1-1024x28.png 1024w, https:\/\/successrouter.com\/tech\/wp-content\/uploads\/2024\/01\/image-1-300x8.png 300w, https:\/\/successrouter.com\/tech\/wp-content\/uploads\/2024\/01\/image-1-768x21.png 768w, https:\/\/successrouter.com\/tech\/wp-content\/uploads\/2024\/01\/image-1-850x23.png 850w, https:\/\/successrouter.com\/tech\/wp-content\/uploads\/2024\/01\/image-1.png 1037w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>If the certificate is not visible then it must be installed under &#8220;Manage user certificate&#8221;, in that case we need to first export the certificate and then manually install it under LocalMachine. To do so, execute below command<\/p>\n\n\n\n<p><strong>dotnet dev-certs https &#8211;export-path &#8220;e:\\myfile.crt&#8221;<\/strong><\/p>\n\n\n\n<p>ignore the warning the you see in powershell and double click on myfile.crt to install<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"503\" height=\"642\" src=\"https:\/\/successrouter.com\/tech\/wp-content\/uploads\/2024\/01\/image-2.png\" alt=\"\" class=\"wp-image-109\" srcset=\"https:\/\/successrouter.com\/tech\/wp-content\/uploads\/2024\/01\/image-2.png 503w, https:\/\/successrouter.com\/tech\/wp-content\/uploads\/2024\/01\/image-2-235x300.png 235w, https:\/\/successrouter.com\/tech\/wp-content\/uploads\/2024\/01\/image-2-300x383.png 300w\" sizes=\"(max-width: 503px) 100vw, 503px\" \/><\/figure>\n\n\n\n<p>Click on Install Certificate<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"671\" height=\"652\" src=\"https:\/\/successrouter.com\/tech\/wp-content\/uploads\/2024\/01\/image-3.png\" alt=\"\" class=\"wp-image-110\" srcset=\"https:\/\/successrouter.com\/tech\/wp-content\/uploads\/2024\/01\/image-3.png 671w, https:\/\/successrouter.com\/tech\/wp-content\/uploads\/2024\/01\/image-3-300x292.png 300w\" sizes=\"(max-width: 671px) 100vw, 671px\" \/><\/figure>\n\n\n\n<p>Choose Local Machine and click Next<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"676\" height=\"712\" src=\"https:\/\/successrouter.com\/tech\/wp-content\/uploads\/2024\/01\/image-4.png\" alt=\"\" class=\"wp-image-111\" srcset=\"https:\/\/successrouter.com\/tech\/wp-content\/uploads\/2024\/01\/image-4.png 676w, https:\/\/successrouter.com\/tech\/wp-content\/uploads\/2024\/01\/image-4-285x300.png 285w, https:\/\/successrouter.com\/tech\/wp-content\/uploads\/2024\/01\/image-4-300x316.png 300w\" sizes=\"(max-width: 676px) 100vw, 676px\" \/><\/figure>\n\n\n\n<p>Choose &#8220;Place all certificate in following store&#8221; and choose Personal. Click &#8220;Ok&#8221;. And then click &#8220;Next&#8221;<\/p>\n\n\n\n<p>After installation do the same step again for &#8220;Trusted Root Certification Authorities&#8221; region.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Write comment if you face any issue.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you want to run localhost in https protocol, you must need to install the localhost certificate in LocalMachine region. To do the same &#8211; execute below command from powershell(admin mode) dotnet dev-certs https &#8211;trust verify if the certificate install has happend in the CurrentUser region or LocalMachine(Computer) region If you could something like below&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[30,11],"_links":{"self":[{"href":"https:\/\/successrouter.com\/tech\/wp-json\/wp\/v2\/posts\/104"}],"collection":[{"href":"https:\/\/successrouter.com\/tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/successrouter.com\/tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/successrouter.com\/tech\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/successrouter.com\/tech\/wp-json\/wp\/v2\/comments?post=104"}],"version-history":[{"count":3,"href":"https:\/\/successrouter.com\/tech\/wp-json\/wp\/v2\/posts\/104\/revisions"}],"predecessor-version":[{"id":112,"href":"https:\/\/successrouter.com\/tech\/wp-json\/wp\/v2\/posts\/104\/revisions\/112"}],"wp:attachment":[{"href":"https:\/\/successrouter.com\/tech\/wp-json\/wp\/v2\/media?parent=104"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/successrouter.com\/tech\/wp-json\/wp\/v2\/categories?post=104"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/successrouter.com\/tech\/wp-json\/wp\/v2\/tags?post=104"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}