1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

URI/URL/URN/ドメインの違い

Posted at

概要

ネットワークについて勉強中。

curlコマンドについて勉強しようと思ったら、そもそもネットワークについてちゃんと理解していないなと思って勉強しなおしています。

今回はその中でも、 URI/URL/URN/ドメインってどれも同じだと思っていたら、それぞれちゃんと違いがあったのでメモです。

URI/URL/URN/ドメインとは

Chromeに入れそうな、下記の例をとって説明。

先に言っておくと、これはURIにあたる。

http://www.example.com.index?key1=value1&key2=value2#header1

プロトコル

  • http: プロトコル。サーバーのポート番号が決められている。

    • http = 80
    • https = 443
    • src = Chromeでソースが見れる。といったブラウザごとの隠し機能的なのもあるらしい。

ドメイン: サーバーへのアクセス。インターネット上のネットワークの名前・住所。

  • www: サブドメイン。
  • example: ネイキッドドメイン
  • com: ドメイン
  • www.example.com: ホスト。FQDN。絶対ドメイン名。完全修飾ドメイン名。(Fullpy Qualified Domain Name)
  • example.com: これをドメイン名と呼ぶこともある。

ページ内の情報

  • index: パス名。ファイル。 他にhtmlphpsrcが指定されたり、ファイルのパスが指定する。
  • ?以降のKeyとValue: 引数、パラメーター、クエリ
  • #以降: ハッシュネーム値

URI/URL/URNの違い

  • URI = Uniform Resource Identifier: ハッシュネームまですべてを含む。URLはそもそも、IPアドレスを人間の目から見てもわかりやすいようにしたもの。
    (http://www.example.com/index?key1=value1&key2=value2#header1)
  • URL =  Uniform Resource Locator: パス名まで。(http://www.example.com.index)
  • URN = Uniform Resource Name: プロトコルを含まないパス名まで。  (www.example.com.index)

参考

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?