Skip to main content
Humanities LibreTexts

8.4: Understanding URLs

  • Page ID
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    A URL (Uniform Resource Locator) is just the internet address for any given webpage:

    A screenshot of a web browser. The url is circled.

    Understanding the component parts of a URL can be helpful in a variety of situations. Here are just a few reasons why understanding URLs is useful:

    • The URL often reveals key information about a site
    • An understanding of URLs provides the needed foundation for many advanced search strategies
    • A heightened attention to URLs helps searchers recognize fraudulent sites

    Each section below focuses on a different part of the URL. At the end of the webtext is a quiz that you can take to test your understanding of URLs.

    Locate the Protocol

    The “protocol” is the first part of URL. Some browsers simplify how addresses are displayed by hiding the protocol. For example, in Chrome and Firefox, displays as

    The protocol https indicates that information sent through the page will be encrypted, and therefore harder to read if some third party intercepts the information. (The next time you are entering a username and password on a page, check for the “https” protocol.)

    Locate the Domain Name

    The “domain name” identifies the site that contains the page you are viewing. It appears just before the first single slash (/). If there is no single slash, then the domain name is whatever appears at the end of the URL.

    For example, the following URLs all refer to pages on the Writing Commons site:


    If you look carefully, you will see that most browsers try to help users out by boldfacing the domain name in the address bar.

    Being able to locate the domain name in a URL allows you to identify the entity that hosts the page you are viewing—a piece of information that is often crucial to understanding the nature of your source.

    Recognize Sub-directories

    Elements of the URL that appear after the domain indicate different sub-directories. For example: “open-text,” “information-literacy,” and “rhetorical-analysis” are sub-directories of the domain Think of these as folders within folders.

    Recognize Subdomains

    Subdomains are similar to sub-directories in that they provide a way for website developers to separate content, but subdomains appear before the domain name in the URL.  Don’t let this trip you up.  The domain name is still the content that appears pressed up against the first single slash (/) or—if there is no single slash—at the very end of the URL.

    For example, the domain name in all of the following URLs is

    Pay attention to the placement of the dots.  The following is not a Google page:

    Here the domain is, not

    Recognize Top-level Domains

    In the domain name, the “top-level domain” is .org. The top-level domain .org was originally intended for use by non-profit organizations—and many non-profits continue to use it—but it is now open to anyone.

    In the domain name, the top-level domain is .com. Short for “commercial,” .com is the most common top-level domain in the world and is now used for a wide variety of sites—not just the sites of commercial enterprises.

    Some top-level domains have retained their original meanings and are especially helpful to know:

    domain description example
    .edu university site
    gov government site
    .mil military site

    Newer top-level domains such as .museum, .bike, and .clothing are not yet widely used.

    Some domains include a country domain extension—or “country code top level domain.”

    Here are some examples:

    code country example
    .in India
    .de Germany
    .ca Canada
    .jp Japan
    .uk United Kingdom

    Pay attention to country domain extensions. When present in a URL, they represent a core component of the domain. Note, for example, that and are different domains. The two are unrelated sites run by unrelated entities.

    For a comprehensive list of top-level domains, consult one of the following:

    Use Your Understanding of URLs To Enhance Your Web Searching

    Once you understand URLs, certain kinds of advanced search strategies become easier to conceptualize, remember, and implement—for example, filtering by domain and top-level domain.

    Filter By Top-level Domain

    If you know that the kind of information you are seeking is most likely to appear on a site with a particular type of top-level domain, you can restrict your search to this type of site using the site: search operator.

    For example, if you are seeking government documents on the topic of student loans, then a search for student loans site:gov will return only results with the top-level domain gov, filtering out a large number of sites that are not relevant to your research needs.

    Filter By Domain

    If you know the domain of the site on which your information will appear, you can use site: to search only that site.

    For example, a search for sample tests will return only pages located on the California Department of Motor Vehicles (DMV) website (the domain of which is

    The site: operator works in all major search engines (Google, Bing, Baidu, DuckDuckGo, etc.).

    Practice Identifying Deceptive URLs

    The immediate benefit of the drill below will be to improve your ability to distinguish between real and fraudulent sites, but the exercise will also help you sharpen your overall URL-analysis skills by heightening your attention to the component parts of URLs.

    A) Which of the following are web pages? Do not go to the sites. (Some sites masquerading as legitimate sites may contain harmful underlying code). Just examine the URLs.


    B) Find the domain name in this URL:


    A) eBay page?

    1. YES This is an eBay page. The domain name is
    2. YES This is an eBay page. The domain name is (“movies” and “half” indicate subdomains).
    3. NO This is not an eBay page. Note that “ebay” is misspelled as ebey.
    4. NO This is not an eBay page. The first single slash (/) is not preceded by the domain name
    5. NO This is not an eBay page. Notice that there is no slash (/) after “”
    6. NO This is not an eBay page. The actual domain is, not  ( is as different from as,,, etc.  One character can make all the difference.)
    7. NO This is not an eBay page. If the hyphen were a period, we’d be fine.  But it isn’t.  As in the example above with @, the hyphen could be any character and be just as wrong.
    8. YES This is an eBay page. The domain name is  The first single slash (/) is directly preceded by
    9. NO This is not an eBay page. The domain name is (not
    10. NO This is not an eBay page. The domain name is (not
     11. NO This is not an eBay page. The domain name is
     12. YES This is an eBay page. The domain name is  The first slash is directly preceded

    B) The domain name in the following URL is (not Notice that is what appears just before the first single slash (/):

    8.4: Understanding URLs is shared under a not declared license and was authored, remixed, and/or curated by LibreTexts.