General URL rules.

Japanese version.

This article introduces general rules and formats for URL.

*While focusing on matters used for general websites, While focusing on matters commonly used for websites, some parts of the URL rules may not be strictly accurate, so that they are easy to understand even for those with no IT expertise.

URL Overview

The URL is roughly structured as follows.

Text colorDescription
RedThe beginning of the URL specifies the protocol (communication method).

Web access begins with "http://" or "https://" (there are others, but they do not appear in general Web access).
There are others, but they do not appear in general Web access.
"https://" is for SSL/TLS encrypted communications, and "http://" is for non-SSL/TLS encrypted communications.

The specification is mandatory, but some browsers may automatically complete the message even if it is omitted.
However, do not expect this to be the case.
BlueSpecify a domain name indicating the location of the web server.

In some cases, ":port number number" is specified at the end of the domain, but this is
This is rare for sites that are open to the public. (The yellow marker part changes to a number.)

This is required as a URL up to this point.
GreenLocation in the web server. Separated by "/" to indicate directories and folders.
Depending on the web system, this may be a parameter.

Basically required, but "index.html" and so on may be omitted.
(Depends on the web server configuration.)
OrangeThis is a parameter that is given to the web system.

In many cases, it is a parameter for measurement systems such as Google Analytics, or a code for products to be displayed in an e-commerce system.

This parameter begins with "?".
A parameter is a parameter until the end of the URL or the appearance of the "#".
The "?" appears only once in the URL.

Details are described later.
PurpleThe "#" is an anchor designation (a positional designation of a link within a page).

The content is up to the site author, but "#top", "#head", and "#head",WordPress headings, etc. are commonly used.

Anchors appear only once at the end of the URL.
Also, "#" may occur in Yahoo's conversion measurement.

About Parameters

The part of the URL after the "?" and ends with the URL or until the "#" appears.

Basic format

The "?" appears only once in a URL.

Parameters are in the format "Parameter name=Value".

If there are multiple parameters, they are separated by "&".

The "&" and "=" are special characters that do not appear except for this purpose.

The same parameter name may not appear more than once.
If they do occur, it is important to refrain from using them, since it is not yet clear how they will work depending on the system.

Value encoding

Japanese and escape characters (:&? /%#, and other characters that have special meanings in URLs) will not occur.

These characters must be URL-encoded (percent-coded), and strings specified in values should basically be URL-encoded.

Since it is difficult to encode manually, use a Conversion tool or Excel's ENCODEURL function.

The browser may translate the encoding on its own, but it is safer not to rely on it.

Parameter types: Active and Passive (Dummy)

There are two types of parameters: active parameters and passive parameters (also called dummy parameters).

Both have the same rules but different uses.

ActiveThis is a parameter that changes what is displayed on the page depending on the parameter.
In some cases, such as when specifying a product code (as is often the case on e-commerce sites), or a background color, etc., the parameter can be used to change the content of the page.
Passive (Dummy)A parameter that does not change what is displayed on the page depending on the parameter.
The utm_source of Google Analytics is a typical example, mainly used for access measurement.


Formula for extracting URL parameter values.(Microsoft Excel)