What is URL (Uniform Resource Locator)?

A string that gives the location of a resource such as a web page. As in https://www.example.com:8443/docs/page.html?q=1#top, it consists of a scheme (https), a host name, a port number, a path, a query (after ?) and a fragment (after #). If the port is omitted, the default is used (443 for HTTPS), and the host name is converted to an IP address by DNS.

Japanese name: URL

URL (Uniform Resource Locator) appears in 14 practice questions across 5 topics, including Web Technology Basics, Information Security Basics, Cloud and Container Basics.

Field: Web Technology Basics

Try it: questions about URL (Uniform Resource Locator)

A browser opens https://www.example.com:8443/docs/guide.html?lang=ja#install. Which part of this URL is not included in the request sent to the server and is used only inside the browser after the page loads?

  1. A:8443
  2. B?lang=ja
  3. C#install
Show answer and explanation

Answer: C. #install

This URL consists of the scheme (https), the host name (www.example.com), the port number (8443; if omitted, 443 for https), the path (/docs/guide.html), the query (lang=ja) and the fragment (install). The browser uses the port number to decide where to connect and sends the path and query to the server in the request, but it does not send the fragment after #. The fragment is used only inside the browser, for example to move to the position of the element with id="install" in the page.

To put the Japanese character "あ" into a URL query, the byte sequence representing it in UTF-8 (E3 81 82) is percent-encoded. Which of the following is the correct result?

  1. A%E3%81%82
  2. B%u3042
  3. Cあ
Show answer and explanation

Answer: A. %E3%81%82

In percent-encoding, when characters that cannot be written in a URL as they are, or characters with special meanings such as / ? # &, are used as data, the characters are turned into bytes and each byte is written as "%" followed by two hexadecimal digits. "あ" is the three bytes E3 81 82 in UTF-8, so it becomes %E3%81%82. A space becomes %20 (in the form submission format, + is also used). In JavaScript, the encodeURIComponent function performs this conversion.

URL (Uniform Resource Locator) in the explanations

Questions that mention URL (Uniform Resource Locator) (14)

  1. A container is started with the command above from the image nginx, a web server that listens on port 80. The host's IP address is 192.0.2.10, and there are no restrictions such as a firewall. Which of the following is the URL to use to reach this web server from a browser on another PC on the same network?
  2. A browser opens https://www.example.com:8443/docs/guide.html?lang=ja#install. Which part of this URL is not included in the request sent to the server and is used only inside the browser after the page loads?
  3. To put the Japanese character "あ" into a URL query, the byte sequence representing it in UTF-8 (E3 81 82) is percent-encoded. Which of the following is the correct result?
  4. A merchant's server wants to know immediately when a payment is completed on an online payment service. Which of the following correctly describes the method in which the payment service sends a notification by HTTP POST to a URL the merchant registered in advance (a webhook)?
  5. Under the browser's same-origin policy, which of the following URLs is considered to have the same origin as https://www.example.com/app/index.html?
  6. A web application reads and displays a file by joining a file name given in a URL parameter to the name of its public folder. If a value containing ../ is given as the file name, configuration files and other files outside the public folder can be read. Which combination correctly gives the name of this attack and a countermeasure?
  7. In a Kubernetes cluster, HTTPS requests arriving for one host name should be routed to the api Service if the path begins with /api, and to the web Service otherwise. Which of the following resources is suitable for defining this routing rule?
  8. What is the main role of DNS (Domain Name System)?
  9. Which of the following does HTTPS (HTTP protected by TLS) protect?
  10. Which of the following correctly pairs an HTTP status code with its meaning?
  11. Which of the following is an appropriate web API design that follows the principles of REST?
  12. Which combination correctly gives the phishing technique and a countermeasure on the user's side?
  13. If a web application keeps using the same session ID before and after login, an attacker may get the user to use a session ID the attacker prepared in advance and then, after the user logs in, impersonate the user with that ID. What is the most appropriate countermeasure against this attack?
  14. Which of the following correctly describes a WAF (web application firewall)?

Books on Web Technology Basics Ad

As an Amazon Associate I earn from qualifying purchases.

Related terms

IP address HTTP (Hypertext Transfer Protocol) HTTPS Port number Firewall TLS Container Same-origin policy Kubernetes Reverse proxy

Back to the glossary