[GH-ISSUE #234] Create cert for host with port doesn't allow #150

Closed
opened 2026-02-25 22:32:43 +03:00 by kerem · 2 comments
Owner

Originally created by @truongnmt on GitHub (Jan 10, 2020).
Original GitHub issue: https://github.com/FiloSottile/mkcert/issues/234

I want to create a certification for a host with a specific port:

mkcert "localhost:4447"

On execute this following command, we get this following result:

Using the local CA at "/Users/truongnmt/Library/Application Support/mkcert" ✨
ERROR: "localhost:4447" is not a valid hostname, IP, URL or email
Originally created by @truongnmt on GitHub (Jan 10, 2020). Original GitHub issue: https://github.com/FiloSottile/mkcert/issues/234 I want to create a certification for a host with a specific port: ```bash mkcert "localhost:4447" ``` On execute this following command, we get this following result: ``` Using the local CA at "/Users/truongnmt/Library/Application Support/mkcert" ✨ ERROR: "localhost:4447" is not a valid hostname, IP, URL or email ```
kerem closed this issue 2026-02-25 22:32:43 +03:00
Author
Owner

@arafel commented on GitHub (Jan 10, 2020):

Hi

You can't include a port in the name - this support doc explains it quite well. To quote:

The common name is not a URL. It doesn’t include any protocol (e.g. http:// or https://), port number, or pathname.

<!-- gh-comment-id:573057482 --> @arafel commented on GitHub (Jan 10, 2020): Hi You can't include a port in the name - [this support doc](https://support.dnsimple.com/articles/what-is-common-name/) explains it quite well. To quote: > The common name is not a URL. It doesn’t include any protocol (e.g. http:// or https://), port number, or pathname.
Author
Owner

@truongnmt commented on GitHub (May 3, 2020):

Thanks for pointing out!

<!-- gh-comment-id:623203870 --> @truongnmt commented on GitHub (May 3, 2020): Thanks for pointing out!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/mkcert#150
No description provided.