Getting Started

Discover and Register Domains

Find domains that reach ApiRuler without a Route and register each one as a Service and host Route.

What Discovery Shows

Discovery lists hostnames that are not registered in ApiRuler yet. It is meant for onboarding: a company points an existing API domain at ApiRuler, the domain appears on the page, and one form turns it into a Service and a host-based Route.

Two sources feed the list. Traffic: requests that reached the gateway but matched no Route (the gateway answered 404), grouped by host from the request log. Certificate: SNI hostnames that exist in Certificates but that no Route serves.

What a domain needs to appear

Its DNS must point at ApiRuler and the edge proxy must forward unknown hosts to the gateway. A single request such as curl http://api.example.com/ is enough; the page refreshes from the log on demand.

Read the List

Navigation pathMain menuDiscovery
  1. Choose the period (last 24 hours, 7 days or 30 days). Requests and Last seen are computed for that period.
  2. Review Host, Seen in (Traffic, Certificate or both), Requests without a route and Last seen.
  3. Expand a row to see the most requested paths of that host and to open its raw log lines in Grafana.
  4. Turn on Show IP addresses to include requests whose Host header was a bare IP; these are hidden by default because they are usually scanners.
  5. Use Ignore host on noise you do not plan to register; Show ignored brings it back. Ignoring is stored only in the current browser.
Registered since

A host that received traffic in the period but now has a matching Route is not listed; the page shows how many were hidden for this reason.

Register a Domain

  1. Select Register on the host row. The dialog pre-fills the host and suggests a Service and Route name from it.
  2. Enter the Upstream URL: the origin server that should receive the traffic, for example https://origin.example.com:8443/api.
  3. Check the DNS hint. The dialog resolves the domain and lists its current A, AAAA and CNAME records; if one of them is still the origin server, click it to use it as the upstream.
  4. Optionally restrict the Route with Paths, choose HTTPS only, or change Preserve Host and Strip Path.
  5. Select Register. ApiRuler creates the Service first and then the host Route. Both carry the tag discovery.
  6. Select Open Service to add authentication, rate limiting or other Plugins.
If the Route fails

The Service is kept. Fix the Route fields and select Retry Route; only the Route is created on the retry, so nothing is duplicated.

Field Defaults

FieldDefaultWhy
Service and Route nameDerived from the host, for example api-example-comUnique, readable and easy to find later.
HostsThe discovered hostMore hosts or a wildcard such as *.example.com can be added, comma separated.
PathsEmptyThe Route serves every path of the host; add paths to restrict it.
ProtocolsHTTP and HTTPSChoose HTTPS only when plain HTTP must be rejected.
Preserve HostOnThe origin served this domain before and usually expects its own Host header.
Strip PathOff (shown when Paths are set)The upstream receives the same path the client requested.

Discovery Troubleshooting

ProblemLikely causeWhat to do
The page says traffic discovery is off.No Grafana API token (or direct Loki URL) is configured for the Manager.Set NEXT_PUBLIC_GRAFANA_API_TOKEN; the request log is read from Loki through Grafana. Certificate hostnames are listed regardless.
A domain that is pointed at ApiRuler does not appear.The edge proxy only forwards known hosts, or no request has been made yet.Allow unknown hosts to reach the gateway and send one request to the domain, then Refresh.
Gateway traffic could not be loaded.Loki rejected the query (period too long for retention, series limit) or Grafana is unreachable.Choose a shorter period and check the Grafana URL and token.
Many random hostnames or IP addresses are listed.Internet scanners send requests with arbitrary Host headers.Keep Show IP addresses off and use Ignore host for the rest.
Register fails with a name conflict.A Service or Route with the suggested name already exists.Change the name in the dialog and retry.

Need a hand?

If you get stuck during installation or configuration, our team is ready to help.