How Do I Handle HTTP/S traffic?
You can create HTTP/S endpoints to serve web services like REST APIs, web applications, websites and websocket servers.
Quickstart
You can create an HTTP/S endpoint using the ngrok agent configuration file. You can edit the file with the following terminal command:
Loading…
Specify the endpoint URL in your configuration as shown in the following example:
Loading…
Then, start the agent with the following command:
Loading…
Learn more
- URL Validation — URLs are validated differently depending on their binding. To learn more about valid URLs for HTTP/S endpoints, see the Endpoint URLs documentation.
- Domains — Public HTTP/S endpoints must match a domain on your account. See the domains documentation for more information.
- Bring your own domain — To use your own domain with HTTP/S endpoints, see the guide on the subject.
- Wildcard Endpoints — You can create HTTP/S endpoints that receive traffic from all of the subdomains matching a given wildcard domain. See the wildcard domain docs for more information.
- Traffic Policy — Attach Traffic Policy to endpoints to route, authenticate and transform the traffic through the endpoint.
- Agent Forwarding — The ngrok agent and Agent SDKs forward traffic that your endpoints receive to upstream services. See the agent forwarding documentation for more information.
- Traffic Observability — Traffic Inspector gives you a real-time view in the ngrok dashboard of the HTTP traffic flowing through your HTTP/S endpoints. You can even export traffic logs with the Traffic Events system.
- TLS — Learn how ngrok automatically handles TLS and TLS termination for HTTP/S endpoints for you.
Errors
Learn how ngrok handles errors for HTTP/S endpoints in the Errors documentation.
API
HTTP/S Endpoints can be created programatically. Consult the documentation on Endpoint APIs.
Limits & pricing
HTTP/S endpoints are available on all plans. Consult the pricing documentation for general billing details.
For HTTP/S limits, see the endpoint Limits documentation.