URI 그리고 URL을 혼용해서 사용하는 경우가 있다. 대부분의 경우 문제가 없지만 정확하게 이 둘의 차이점이 존재한다. 그러므로 각 용어의 정의와 용도에 대해서 알아본다.

URI

URI는 특정 리소스를 식별하는 통합 자원 식별자(Uniform Resource Identifier)를 의미한다. 웹 기술에서 사용하는 논리적 또는 물리적 리소스를 식별하는 고유한 문자열 시퀀스다.

URL

URL은 흔히주소라고도 하며, 컴퓨터 네트워크 상에서 리소스가 어디 있는지 알려주기 위한 규약이다. URI의 서브셋이다.

 

 

 

비록 URL은 URI의 서브셋이지만 URI와 URL의 가장 큰 차이점은 바로 아래와 같다

URI는 식별하고, URL은 위치를 가르킨다.

실세계에 빗대어 예시를 들어보자면 다음과 같다.

“Charles” 는 내 이름이며 식별자(Identifier)다. 이는 URI와 비슷하지만 내 위치나 연락처에 대한 정보가 없으므로 URL은 될 수 없다.

“경기도 성남시 분당구 정자동 불정로 6”는 주소다. 주소는 특정 위치를 가르킨다. URL 및 URI와 비슷하며 간접적으로 내가 있는 장소로 식별한다.

실제 네트워크상에서 URI와 URL을 예시는 다음과 같다.

두 주소는 모두 index.html을 가리키고 있다.

첫번째 주소는 웹서버의 실제 파일 위치를 나타내는 주소이므로 URI이면서 URL이다.
두번째 주소는 실제로 index라는 파일이 웹서버에 존재하지 않으므로 URL은 아니다. 하지만 서버 내부에서 이를 처리하여 결국 index.html을 가리키기 때문에 URI라고 볼 수 있다.

URI의 구조

일반 URI는 다음과 같은 형태를 나타낸다.

scheme:[//[user[:password]@]host[:port]][/path][?query][#fragment]
  1. scheme : 사용할 프로토콜을 뜻하며 웹에서는 http 또는 https를 사용
  2. user와 password : (서버에 있는) 데이터에 접근하기 위한 사용자의 이름과 비밀번호
  3. host와 port : 접근할 대상(서버)의 호스트명과 포트번호
  4. path : 접근할 대상(서버)의 경로에 대한 상세 정보
  5. query : 접근할 대상에 전달하는 추가적인 정보 (파라미터)
  6. fragment : 메인 리소스 내에 존재하는 서브 리소스에 접근할 때 이를 식별하기 위한 정보

 

 


후원하기

카테고리: etc

28개의 댓글

양주인 · 2021년 7월 6일 2:13 오전

개념이 헷갈렸는데, 덕분에 잘 정리하고 갑니다.
감사합니다!

백수열 · 2021년 11월 16일 6:34 오후

감사합니다!

공공 · 2022년 1월 4일 2:12 오전

감사합니다:)

김준호 · 2022년 8월 13일 5:05 오후

감사합니다.!

    Charlezz · 2022년 9월 10일 12:00 오후

    감사합니다!

dean · 2022년 9월 14일 9:50 오후

안녕하세요. 항상 좋은 글 감사합니다. 조금 정정해야 될 부분이 있는것 같아서 남겨봅니다.

rfc-1738 의 정의에 따르면, URL 은 인터넷을 통해 이용 가능한 간결한 표현/구문된 문자열을 의미합니다.
따라서 찰스님의 예시는 모두 URL 에 해당될 수 있습니다. 인터넷을 통해 이용 가능한 문자열이기 때문이죠.

URL 은 문자열 표현이며, 예시처럼 back-end 서버의 rewrite 처리와 같은 아키텍쳐에 결정되는 요소일 수 없습니다.
index.html 리소스는 추상적일수도 물리적일수도 있고, 아키텍쳐에 따라 처리방법은 무한할 것 입니다.
다시 말해 index.html 파일은 `전혀` 존재하지 않을 수 있습니다.

URI 는 추상적/물리적 리소스를 식별하기 위한 식별자(Identifier)로써 정의에 초점이 맞춰져있다면,
URL 은 인터넷환경에서 접근가능한 문자열 형태의 표현 Locators(지시자?)에 초점이 맞춰져 있습니다.

즉, HTTP 프로토콜에서 논의될때, RFC 문서상 둘은 유사하며 URL 은 URI 정의를 따르기 때문에 경로 문자열(String) 실체만으로 둘을 구분하기는 어려워 보입니다.

글의 주제에 맞게 둘을 구분할 부분을 찾아본다면,.
“Rest API 를 설계할때는 URI 정의를 참고해야한다.” 와같이 접근될 수 있지않을까 싶네요.

    Charlezz · 2022년 9월 21일 11:05 오후

    식별자(URI)와 지시자(URL)의 개념에 초점을 맞추고, 이 둘을 구분 짓기 위해 하나의 예시를 들었는데요, 말씀하신대로 완벽히 개념을 구분짓기에는 부족한 부분이 있는 것 같네요. 더 공부해보고 추후에 내용을 더 수정할 수 있도록 해보겠습니다. 좋은 의견 감사합니다.

먹튀 · 2022년 9월 22일 9:15 오전

Thanks for finally writing about > URI랑 URL 차이점이 뭔데?
| 찰스의 안드로이드 < Loved it!

이현호 · 2022년 11월 2일 3:57 오후

정말 도움이 되었습니다. 감사합니다.

king · 2023년 2월 4일 6:23 오후

이 블로그는 뭘로 만든거라예 ?

    Charlezz · 2023년 2월 9일 8:01 오후

    워드프레스로 만들었습니다.

DBT Therapist · 2023년 9월 19일 6:46 오전

Hi there very nice web site!! Guy .. Beautiful .. Superb ..

I will bookmark your website and take the feeds additionally?

I’m glad to find numerous helpful info here in the post, we want
develop more strategies on this regard, thanks for sharing.
. . . . .

블루안마 · 2023년 11월 7일 12:12 오전

I got this website from my buddy who told me regarding
this web page and now this time I am visiting this web site and reading very informative content at
this place.

강남블루안마 · 2023년 11월 7일 2:43 오전

Great blog here! Also your website loads up very fast!
What host are you using? Can I get your affiliate link to your host?
I wish my website loaded up as quickly as yours lol

Escort Birmingham · 2023년 11월 8일 3:32 오후

Your contributions are priceless; they expertly steer the community. Your unwavering commitment to quality and your ability to produce accurate and perceptive content are true inspirations.

milgard trinsic window sizes · 2023년 11월 9일 7:15 오전

I read this paragraph fully on the topic of the difference of
hottest and previous technologies, it’s awesome article.

GirlsWay · 2023년 11월 18일 12:42 오전

each time i used to read smaller posts which as well clear
their motive, and that is also happening with this
paragraph which I am reading at this place.

sex · 2023년 11월 19일 2:58 오전

certainly like your website however you need to take a look at the spelling on quite
a few of your posts. Many of them are rife with spelling
problems and I find it very troublesome to tell the truth then again I’ll certainly come
again again.

TastyBlacks · 2023년 11월 19일 1:00 오후

I’ve been exploring for a little for any high quality articles
or blog posts in this kind of space . Exploring in Yahoo I
finally stumbled upon this website. Studying this information So
i am happy to convey that I’ve a very excellent uncanny
feeling I came upon just what I needed. I such a lot indubitably will make certain to do not overlook this website
and provides it a glance on a constant basis.

milgard window install · 2023년 11월 25일 6:55 오전

Sweet blog! I found it while browsing on Yahoo News. Do
you have any suggestions on how to get listed in Yahoo News?
I’ve been trying for a while but I never seem to get there!
Appreciate it

DZTzhwuJvgrM · 2023년 11월 26일 11:05 오후

LKFjhBbc

togel keluar hari ini · 2023년 11월 30일 11:05 오전

situs togel onlinetogel online,togel,situs togel online,pasaran togel online terlengkap di
Indonesia,data hk,data sgp,data sdy,prediksi angka keluaran togel,situs
judi togel online,judi togel,Live Draw Sgp,bandar judi togel online,bandar togel,
togel hari ini,agen togel hk resmi,agen togel terpercaya,togel online terpercaya,toto macau,togel keluar hari ini,Prediksi
Togel,agen togel online

vivoslot · 2023년 12월 1일 12:17 오후

Greetings! I know this is kinda off topic but I’d
figured I’d ask. Would you be interested in exchanging links or maybe guest authoring a
blog article or vice-versa? My blog covers a
lot of the same subjects as yours and I believe we
could greatly benefit from each other. If you happen to be
interested feel free to shoot me an email.
I look forward to hearing from you! Awesome blog by the way!

osg777 · 2023년 12월 1일 7:09 오후

Today, I went to the beach front with my kids. I found a sea shell and gave it
to my 4 year old daughter and said “You can hear the ocean if you put this to your ear.” She placed the shell
to her ear and screamed. There was a hermit
crab inside and it pinched her ear. She never wants to go back!
LoL I know this is entirely off topic but I had to
tell someone!

خرید بازی کامپیوتر · 2023년 12월 1일 8:14 오후

Hi there, i read your blog occasionally and i own a similar one and i was just wondering if you get a
lot of spam remarks? If so how do you stop it, any plugin or anything you can advise?
I get so much lately it’s driving me mad so
any assistance is very much appreciated.

sadisflix · 2023년 12월 2일 6:16 오후

Découvrez Sadisflix.bond, votre plateforme ultime pour regarder des
films en streaming VF/VOSTFR gratuitement en HD. Profitez d’une collection impressionnante de films et séries de l’année 2023.
Plongez dans l’univers captivant du cinéma depuis
chez vous.

slot gacor · 2023년 12월 4일 12:39 오전

Hi, i think that i saw you visited my weblog so i came to “return the favor”.I
am trying to find things to improve my site!I suppose its ok
to use some of your ideas!!

Hoa qua Daklak · 2023년 12월 4일 1:07 오전

Greetings! Very helpful advice in this particular article!
It’s the little changes that produce the greatest changes.
Many thanks for sharing!

답글 남기기

Avatar placeholder

이메일은 공개되지 않습니다. 필수 입력창은 * 로 표시되어 있습니다.