http://example.com/test/test/coffee.html <- this is called a URL

/test1/test2/ <- this called a path

In this context, what would be a proper expression for a part of that path, such as test2?

  • 1
    I am not aware of an established name. The relevant Wikipedia article uses path component. In XPath (which is not about URLs, but uses a similar syntax), they are called location steps. Apr 3, 2017 at 14:54

2 Answers 2


It's called the path segment.

See: https://www.rfc-editor.org/rfc/rfc2396#section-3.3

The path may consist of a sequence of path segments separated by a single slash "/" character.


A URL (Uniform Resource Locator) is used to uniquely identify a resource over the web. URL has the following syntax:


So, URL consists of 4 parts. The path, in fact, is nothing more than a relative directory. In your example, test2 may either refer to a directory that has an index file or a file name changed by using URL rewrite function.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.