Skip to content

url.subdomain example is confusing or incorrect #4037

Description

@mjq

Area(s)

area:url

What's the problem?

The url.subdomain attribute is defined with the following brief:

The subdomain portion of a fully qualified domain name includes all of the names except the hostname under the registered_domain. In a partially qualified domain, or if the qualification level of the full name cannot be determined, subdomain contains all of the names below the registered domain.

(Emphasis mine.)

The note says:

The subdomain portion of www.east.mydomain.co.uk is east. If the domain has multiple levels of subdomain, such as sub2.sub1.example.com, the subdomain field should contain sub2.sub1, with no trailing period.

(Emphasis again mine.)

I can't figure out by what rule or guideline the www label of the www.east.mydomain.co.uk domain name would be excluded from the subdomain. www.east precedes the registered domain in the same way that sub2.sub1 does in the following example - the brief seems fairly explicit that www.east would be the expected value. There is no mention of special handling for www labels here or elsewhere in the url model.

Describe the solution you'd like

In order of preference, my suggested solutions are:

  1. Update the expected url.subdomain of www.east.mydomain.co.uk to www.east. IMO the existing definition as written for url.subdomain is sensible, and we should follow it.
  2. Update url.subdomain's brief to specify why the leading www. is not part of www.east.mydomain.co.uk's subdomain. If this example is truly intentional, then it ought to be part of the field's specification.

It appears that this definition and example was imported from ECS in #496, if that's a consideration.

Tip

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions