0% found this document useful (0 votes)
9 views14 pages

hmtl urls

The document provides an introduction to web design, focusing on the structure and importance of URLs, which consist of a protocol, domain name, and path. It explains the differences between absolute and relative URLs, highlighting their respective advantages for web development and SEO. Additionally, it discusses the significance of using HTTPS for secure data transmission over the internet.

Uploaded by

nalumansitheresa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views14 pages

hmtl urls

The document provides an introduction to web design, focusing on the structure and importance of URLs, which consist of a protocol, domain name, and path. It explains the differences between absolute and relative URLs, highlighting their respective advantages for web development and SEO. Additionally, it discusses the significance of using HTTPS for secure data transmission over the internet.

Uploaded by

nalumansitheresa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

INTRODUCTION TO WEB DESIGN

DCIS1204
SEMISTER TWO
YEAR ONE
HMTL URLS

A URL stands for Uniform Resource Locator


s a unique identifier used to locate a resource on the internet through a web browser. It is also
referred to as a web address. URLs consist of multiple parts including a protocol and domain name
that tell a web browser how and where to retrieve a resource.
End users use URLs by typing them directly into the address bar of a browser or by clicking a
hyperlink found on a webpage, bookmark list, in an email or from another application.
Every URL is made up of multiple parts, and the way yours are built will have a variety of effects
on your site’s security and Search Engine Optimization (SEO).

For example,
if you enter https://themeisle.com/blog/what-is-a-website-url/ in your web browser, your web
browser will take you to this post. But if you just enter https://themeisle.com/, you get taken to the
Themeisle homepage.
URLs (3 key parts)

1. The protocol

The protocol tells your browser how to communicate with a website’s server, in order to send and
retrieve information. In other words, it’s what enables a URL to work in the first place.
Look at the following URL:
https://www.mtac.ac.ug/courses/computing-information-systems
and
https://www.mtac.ac.ug/courses/computing-information-systems
http:// and https:// appear at the beginning of almost every URL that you may come across.
However, this element – the URL’s ‘protocol’ – is more important than you might think.
Examples of URL
https://developer.mozilla.org
https://developer.mozilla.org/en-US/docs/Learn/
https://developer.mozilla.org/en-US/search?q=URL
URLs (3 key parts)

Before, most websites have used Hypertext Transfer Protocol (HTTP).However, there’s been a recent
move towards widespread adoption of Hypertext Transfer Protocol Secure (HTTPS). While this
protocol does essentially the same thing as HTTP, it’s a much more secure option that encrypts the
data sent back and forth between the browser and server. That’s why most browsers give it a
security padlock:

It is always a good practice to have your website configured and runs with (HTTPS) in the url.

2. The domain name

The second part of the URL is the ‘domain name’.

A domain name is an identifier for a specific site, which will generally brings the user straight to the
home page of the website if nothing else is added to the end of it.
URLs (3 key parts)

In this case, it’s www.mtac.ac.ug (is the domain name). a domain name is actually made
up of two parts.i.e The domain name mtac and the Top-Level Domain (TLD)The latter
term refers to the .com, .org, .net designator (among others) at the end of the domain
name.A domain should be unique and attention-grabbing, but at the same time clear and
easy to remember.

The choice of TLD matters as well. For many sites, sticking with .com is the best option.
It’s the TLD internet users are most familiar with and are usually expecting, which means it
will be easiest for them to remember. However, you can also choose a TLD that’s a better
fit for your niche or field.
URLs (3 key parts)

3. The Path
If a user wants to visit website’s front page, only the protocol and the domain name are
needed to go the a specific home page : https://www.mtac.ac.ug.
But each individual page or file on a website has its own URL. For example to access if
user wants to access aparticular file or page a path has to be followed
https://www.mtac.ac.ug/courses/computing-information-systems
The part after the TLD is known as the ‘path’. This is because it directs the browser to a
specific page on the website. In this case, it leads first to the MTAC courses the to
computing-information-systems, then to a particular post:
Importance of a URL design

URLs can only be sent over the Internet using the ASCII (American Standard Code for
Information Interchange) character-set. Because URLs often contain non-ASCII
characters, the URL must be converted into a valid ASCII format. URL encoding replaces
unsafe ASCII characters with a "%" followed by two hexadecimal digits. URLs cannot
contain spaces.
ASCII (American Standard Code for Information Interchange)character encoding
standard for electronic communication
ASCII codes represent text in computers in the binary format of 01, telecommunications
equipment, and other devices. Most modern character-encoding schemes are based on
ASCII, although they support many additional characters.
URL vs URI

A URL is the most common type of Uniform Resource Identifier (URI). URIs are strings of
that identifies a resource on the web either by using location, name or both.
In the web dev world, you might be trying to get different resources by name so you'll have
different URIs that have distinct URLs. And that's how the confusion started. Now that you
know the difference, hopefully it won't be as hard for you to figure out what you need and
where to find it when people start talking about resources.
URL is the locator of a resource. The URI is the identifier of the resource and it can just
happen to be a locator
Types of URL

1. An Absolute URL
In otherwords An absolute URL is the URL that includes every part of the URL format, such as
protocol, host name, and path of the document, e.g., https://www.google.com/,
https://www.example.com/form.phpetc.
2. A relative URL
A relative URL points to a file/directory in relation to the present file/directory.
They have short urls as they are referring to root directory/subdirectory.Relative urls helps webmaster
to maintain the site without rewriting the whole path again and again if they had made any changes in
directory.
eg : ../image/welcome.gif is a relative url (The initial two peroids (..) in the url instruct the server to
move up one directory (which is the root directory), then enter images directory and finally point at
welcome.gif file )
Relative urls are to be used wisely otherwise an error may occur and the intended file may not
open.Relative URLs are short and does not require to write whole path so due to its short type in nature
they are more popular and are commonly used by webmasters.
Types of URL

1. An Absolute URL
absolute is : not dependent on any thing ie independent having its own existence, same is
the meaning of absolute urls.
Therefore an absolute URL, is a URLwhich is independent or free from any
relationship from the rest. When you use an absolute URL, you point directly to the
file you give exact location of the file.
eg : “mtac.ac.ug/images/welcome.gif” is an absolute url as it specifies that an image file
welcome.gif located in the images directory, under mtac.ac.ug domain.
You should always opt for absolute url when referring to other site.Generally such url are
long and hence are not much preferred by lazy webdeveloper they like to use relative urls.
While changing directory structure you need to rewrite whole path of the new directory and
file which can be cumbersome but as far as SEO(Search Engine Optimization) is
concerned spiders like to crawl absolute url.
Why Choose Absolute URLs?

Foils Scrapers
An absolute URL makes it harder for people to scrape information from your site
directory using scraper programs. If you have all of your internal links as relative URLs,
it would be very easy for a scraper to simply scrape your entire website and put it up on
a new domain.
Disallows Duplicate Content
It's very important to have absolute URLs in order to avoid duplicate content issue.
Imagine you have multiple versions of root domains that are indexed in Google without
a canonical tag point to correct version of the site. For example:
http://www.example.com
http://example.com
https://www.example.com
https://example.com
Why Choose Absolute URLs?

Helps With Crawling


Google crawlers follow the internal links on your pages to crawl more deep pages on your
site. There is a limited number of URLs that Google crawlers crawl due to the actual cost
involved in it. Based on this fact if you have a million pages on your site and during the
crawl if Google comes across an issue more frequently, then it would be more logical for
them to leave the site.
Why Choose Relative URLs?

Quicker Coding
Large websites are made much easier to code when you shorten your URL into a
relative format.
Staging Environment
If you are using a content management system that has staging environment
with its own unique domain like WordPress or SharePoint, then your entire
website is replicated on that staging domain. The relative format allows the same
website to exist on staging and production domain, or the live accessible version
of your website, without having to go back in and re-code all of the URLs. This
not only makes coding easier for a web developer but also serves as a time
saver.
Faster Load Times
Pages that use relative links will load more quickly than pages using absolute
links, for the most part, although the difference is minuscule at best.
HTTP vs. HTTPs

The Hypertext Transfer Protocol (HTTP) is the foundation of the World Wide Web, and is used
to load webpages using hypertext links. HTTP is an application layer protocol designed to transfer
information between networked devices and runs on top of other layers of the network protocol
stack. A typical flow over HTTP involves a client machine making a request to a server, which then
sends a response message.

Both HTTP and HTTPS are used to retrieve data from a web server to view content in a browser.
The difference between them is that HTTPS uses a Secure Sockets Layer (SSL) certificate to
encrypt the connection between the end user and the server.

HTTPS is vital to protecting sensitive information, such as passwords, credit card numbers and
identity data, from unauthorized access.

You might also like