A URL field stores a single web address. Submitters enter it, and you choose which protocols are accepted. It is the base that link fields build on.
When to use it
- A record needs a destination link: a landing page, a campaign target, or a
mailto:address. - You want a clean, validated address to feed into a Tagged URL or Short URL field.
How a value is produced
When a submission is saved, Terminus Hub stores the address the submitter entered, or thedefault_value if the field was left blank. The address is kept as entered. Terminus Hub does not add a protocol for you.
The value is then validated:
- It must parse as a URL.
- Its protocol must be one of the field’s
allowed_protocols. - It must have an address after the protocol, such as a host, or a recipient for
mailto:. - When
validate_urlis on, the host is resolved and rejected if it points only at a private or internal address.
Settings reference
| Setting | Required | Default | Description |
|---|---|---|---|
allowed_protocols | No | ["http", "https"] | Which schemes are accepted. Any of http, https, mailto. |
validate_url | No | Off | When on, rejects addresses whose host resolves only to a private or internal network. |
default_value | No | None | A URL used to pre-fill the field for a new submission. |
Example
Adestination_url field in a Campaign URL Builder model:
https://shop.acme.example/deals, which is stored as entered. Entering shop.acme.example with no scheme fails validation with must start with one of the following protocols: https. This field then feeds the campaign’s Tagged URL and Short URL fields.
Gotchas
- No protocol is added for you. Include
http://,https://, ormailto:. A bare host such asacme.examplefails validation whenallowed_protocolsis set. - Narrow the protocols to set policy. The default accepts
httpandhttps. Setallowed_protocols: [https]to require secure links, or addmailtofor email addresses. validate_urlblocks internal hosts, not broken links. With it on, an address that resolves only to a private or internal network is rejected. It does not confirm the page loads. Leave it off unless you have a reason to enforce public hosts.- It is the base for other link fields. A Tagged URL references a URL field as its base, and a Short URL can point at a URL or a Tagged URL field as its destination.
Related
- Tagged URL field: appends query parameters to a URL field.
- Short URL field: a short redirect over a URL or Tagged URL field.
- Fields