v1

Domains /

Link a domain to a port

You can point your domains at specific ports on Northflank services. To do this, you will need to link your domain to a port on a service.

Domains on Northflank can be configured using path-based routing. This means that every subdomain you add will have a base path /, which you can link to a port to handle all requests to the subdomain.

You can also add more paths to a subdomain to link a single subdomain to multiple ports and services, and configure how requests to paths and subpaths are handled.

Requirements

You will need the following to get started:

Open the ports & DNS page on the service that contains the port you want to link a subdomain to, and find the entry for the port. Expand the custom domains & security rules view (the port must be public).

Click add custom domain and find the subdomain you wish to associate with the port in the list. If it is not present, click manage domains to add it to your account. You can repeat this for as many subdomains as you want to add.

You can also choose to disable the default code.run domain generated by Northflank.

After saving your changes Northflank will automatically generate TLS certificates for your subdomain. It should redirect to the specified port on your deployment soon after saving, without requiring a service restart.

Linking a domain to a port in a deployment service in the Northflank application

Open the domains page in your team and find the subdomain you want to link to a port. You can also search for the domain by name.

Find the subdomain listed in the domain entry and click the button to edit it.

To link the subdomain to a port find the path base path (/) and select the service and port from the drop-down menus and update path.

Northflank will automatically generate a TLS certificate for your subdomain, and it will redirect to your specified port soon after saving.

Linking a domain to a port from a subdomain settings page in the Northflank application

© 2024 Northflank Ltd. All rights reserved.