Chapterبەش 1 · Lectureوانە 1.2

Browsers, Web Servers and URLsتۆڕگەڕەکان، ڕاژەکارەکانی وێب و URL

How a browser turns HTML tags into a page, what a web server is and how you publish a website with web hosting, the web server programs Apache and IIS, the parts of a URL, and how DNS turns a domain name into an IP address.

چۆن دەکات بە لاپەڕە، چییە و چۆن بە بڵاو دەکەیتەوە، ، و ، بەشەکانی و چۆن دەگۆڕێت بۆ .

20 min read20 خولەک خوێندنەوە · 21 stepsهەنگاو

What you will learnچی فێر دەبیت

  • Explain how a web browser uses HTML tags to display a page.
  • Explain what a web server is and how a website is published with web hosting.
  • Compare Apache and IIS, and know that other free web servers exist.
  • Name every part of a URL.
  • Explain why DNS is needed and choose a good domain name.
  • ڕوونی بکەیتەوە چۆن بەکار دەهێنێت بۆ پیشاندانی لاپەڕە.
  • ڕوونی بکەیتەوە چییە و چۆن بە بڵاو دەکرێتەوە.
  • و بەراورد بکەیت و بزانیت بەخۆڕایی تریش هەن.
  • ناوی هەموو بەشێکی بهێنیت.
  • ڕوونی بکەیتەوە بۆچی پێویستە و باش هەڵبژێریت.

Two machines, one pageدوو ئامێر، یەک لاپەڕە

When you open a web page, two machines work together. On your side is a program called a web browser. On the other side, maybe in another country, is a computer called a web server. Between them is an address that tells the browser where to go: the URL.

کاتێک دەکەیتەوە، دوو ئامێر پێکەوە کار دەکەن. لە لای تۆ هەیە کە پێی دەوترێت . لە لایەکەی ترەوە، لەوانەیە لە وڵاتێکی تر، کۆمپیوتەرێک هەیە کە پێی دەوترێت . لە نێوانیاندا ناونیشانێک هەیە کە بە دەڵێت بۆ کوێ بچێت: .

In this lecture you will learn:

لەم وانەیەدا فێری ئەمانە دەبیت:

  • How a browser turns HTML tags into the page you see.
  • What a web server is, and how you publish a website with web hosting.
  • The web server programs you will meet: Apache and IIS.
  • The parts of a URL, and how DNS turns a domain name into an IP address.
  • چۆن دەکات بەو لاپەڕەیەی دەیبینیت.
  • چییە و چۆن بە بڵاو دەکەیتەوە.
  • کە دەیانبینیت: و .
  • بەشەکانی و چۆن دەگۆڕێت بۆ .

The web browser: a reader of HTMLتۆڕگەڕ: خوێنەرێکی HTML

What is a web browser?تۆڕگەڕ چییە؟

A web browser is the program you use to open web pages. Popular browsers today are Google Chrome, Microsoft Edge, Mozilla Firefox and Apple Safari.

ئەو کە بۆ کردنەوەی بەکاری دەهێنیت. ئەمڕۆ بریتین لە ⁦Google Chrome⁩، ⁦Microsoft Edge⁩، ⁦Mozilla Firefox⁩ و ⁦Apple Safari⁩.

Definitionپێناسە

A program that asks for and shows them on the screen. Chrome, Firefox, Safari and Edge are browsers.

بەرنامەیەکە داوای لە دەکات و لەسەر شاشە پیشانیان دەدات. کرۆم، فایەرفۆکس، سەفاری و ئێج نموونەی تۆڕگەڕن.

Quick checkپشکنینی خێراWhich of these is a web browser?کامیان ؟

The web browser: a reader of HTMLتۆڕگەڕ: خوێنەرێکی HTML

How does a browser display a web page?تۆڕگەڕ چۆن لاپەڕەتۆڕێک پیشان دەدات؟

The browser displays the page by reading the instructions inside it. The most common display instructions are called HTML tags. A tag is a word between angle brackets, such as <h1> (a big heading), <p> (a paragraph) or <a> (a link).

بە خوێندنەوەی ئەو ڕێنماییانەی ناو لاپەڕەکە، پیشانی دەدات. باوترین ڕێنماییەکانی پیشاندان پێیان دەوترێت . وشەیەکە لە نێوان دوو کەوانەی گۆشەدار، وەک <h1> (سەردێڕێکی گەورە)، <p> (بڕگەیەک) یان <a> ().

A web page is only a text fileلاپەڕەتۆڕ تەنها فایلێکی دەقییەwelcome.htmlHTMLRuns in the browserلە ناو تۆڕگەڕ کار دەکات
<!DOCTYPE html>
<html>
<head>
  <title>Welcome</title>
</head>
<body>
  <h1>Welcome to Dilan's Bakery</h1>
  <p>Fresh <strong>bread</strong> every morning.</p>
  <p style="color: green;">Open from 7:00 to 21:00.</p>
  <a href="https://www.example.com/">Visit example.com</a>
</body>
</html>
Explain the codeڕوونکردنەوەی کۆدەکە
Lineدێڕی 7

<h1> tells the browser: show this as a big heading.

<h1> بە دەڵێت: ئەمە وەک سەردێڕێکی گەورە پیشان بدە.

Lineدێڕی 8

<strong> makes the word bread bold.

<strong> وشەی bread ئەستوور دەکات.

Lineدێڕی 9

The style attribute paints this paragraph green.

style ئەم بڕگەیە سەوز دەکات.

Lineدێڕی 10

<a> makes a link. The href attribute holds the URL it opens.

<a> دروست دەکات. href ئەو هەڵدەگرێت کە دەیکاتەوە.

The file above is only text. Nothing in it is bold, green or clickable until a browser reads the tags and draws the page. Every browser in the world can read the same file, because they all follow the same HTML standard (written by the W3C).

فایلەکەی سەرەوە تەنها دەقە. هیچ شتێکی ئەستوور، سەوز یان کرتەپێکراو نییە، تا نەخوێنێتەوە و لاپەڕەکە نەکێشێت. هەموو جیهان دەتوانن هەمان فایل بخوێننەوە، چونکە هەموویان پەیڕەوی هەمان ستانداردی دەکەن (کە نووسیویەتی).

Sheet musicنۆتەی مۆسیقا

A browser is like a musician reading sheet music. The paper (the HTML file) holds only marks; the musician (the browser) reads the marks and turns them into music (the page you see).

وەک مۆسیقاژەنێک وایە کە نۆتەی مۆسیقا دەخوێنێتەوە. کاغەزەکە (فایلی ) تەنها نیشانەی تێدایە؛ مۆسیقاژەنەکە () نیشانەکان دەخوێنێتەوە و دەیانکات بە مۆسیقا (ئەو لاپەڕەیەی دەیبینیت).

Where the analogy stops workingسنووری ئەم نموونەیە

Two musicians may play the same notes a little differently, and two browsers may show the same page with small differences too. That is why developers test their pages in more than one browser.

دوو مۆسیقاژەن لەوانەیە هەمان نۆتە کەمێک جیاواز بژەنن و دوو لەوانەیە هەمان لاپەڕە بە جیاوازیی بچووکەوە پیشان بدەن. بۆیە گەشەپێدەران لاپەڕەکانیان لە زیاتر لە یەک تاقی دەکەنەوە.

The web server: where your website livesڕاژەکاری وێب: ئەو شوێنەی تۆڕگەکەت تێیدا دەژی

What is a web server?ڕاژەکاری وێب چییە؟

The HTML file has to come from somewhere. It is kept on a web server: a computer that stores websites and is connected to the Internet day and night. The same name is also used for the program on that computer that answers the browsers, such as Apache. When a browser asks for a page, the web server finds the file and sends it back.

فایلی دەبێت لە شوێنێکەوە بێت. لەسەر هەڵدەگیرێت: کۆمپیوتەرێک کە هەڵدەگرێت و شەو و ڕۆژ بە بەستراوە. هەمان ناو بۆ ئەو ش بەکار دێت کە لەسەر ئەو کۆمپیوتەرە کار دەکات و بۆ دەنێرێتەوە، وەک . کاتێک داوای لاپەڕەیەک دەکات، فایلەکە دەدۆزێتەوە و دەینێرێتەوە.

Definitionپێناسە

Software, and the computer it runs on, that stores and sends to browsers when they ask. and are web servers.

نەرمەکاڵایەک و ئەو کۆمپیوتەرەی لەسەری کار دەکات، کە هەڵدەگرێت و بۆ دەنێرێت کاتێک داوایان دەکەن. و دوو نموونەی ڕاژەکاری وێبن.

Real web servers live in data centres like this one. Technicians work on them on site, but most of the time developers manage them by remote access. لە ڕاستیدا لە وەک ئەمەدا دەژین. تەکنیککاران لە شوێنی خۆیدا کاریان لەسەر دەکەن، بەڵام زۆربەی کات گەشەپێدەران بە بەڕێوەیان دەبەن.Derrick Coetzee, via Wikimedia Commons · CC0
The library deskمێزی کتێبدار

A web server is like the library of your university. You (the client) go to the desk and ask for a book by its shelf code (the URL). The librarian (the server) finds it in the store room and hands it to you. You never walk into the store room yourself.

وەک مێزی کتێبداری زانکۆکەت وایە. تۆ () دەچیتە سەر مێزەکە و بە کۆدی ڕەفەکەی () داوای کتێبێک دەکەیت. کتێبدارەکە () لە کۆگاکەدا دەیدۆزێتەوە و دەیداتە دەستت. تۆ هەرگیز خۆت ناچیتە ناو کۆگاکەوە.

Where the analogy stops workingسنووری ئەم نموونەیە

A web server can serve thousands of people in the same second, and it gives each one a copy. The original file always stays on the server.

دەتوانێت لە هەمان چرکەدا خزمەتی هەزاران کەس بکات و کۆپییەک دەداتە هەر یەکەیان. فایلە ڕەسەنەکە هەمیشە لەسەر دەمێنێتەوە.

The web server: where your website livesڕاژەکاری وێب: ئەو شوێنەی تۆڕگەکەت تێیدا دەژی

Client and serverڕاژەخواز و ڕاژەکار

The browser and the server play two different roles. The browser is the client: it always starts by asking. The web server is the server: it waits and answers. This way of working is called the client–server model.

و دوو ڕۆڵی جیاواز دەگێڕن. : هەمیشە بە داواکردن دەست پێدەکات. : چاوەڕێ دەکات و دەداتەوە. ئەم شێوەی کارکردنە پێی دەوترێت .

Definitionپێناسە

A way of building network programs in which send and a central sends back . The Web works this way.

شێوازێکی دروستکردنی بەرنامەی ڕایەڵەیە کە تێیدا دەنێرن و ناوەندی دەگەڕێنێتەوە. وێب بەم شێوەیە کار دەکات.

Quick checkپشکنینی خێراWhich program is a web server?کام ؟

The Client Server Model | Clients and ServersThe TechCave · Englishئینگلیزی · 531K viewsبینین · 8.4K likesلایک

Learn what a client is, what a server is, and how they work together in the client–server model, compared with peer-to-peer.

فێر دەبیت چییە، چییە و چۆن لە پێکەوە کار دەکەن، بە بەراورد لەگەڵ .

Whole video: clients, servers and the client–server model

هەموو ڤیدیۆکە: ، و .

Publishing your website: web hostingبڵاوکردنەوەی تۆڕگەکەت: هۆستینگ

Publishing your websiteبڵاوکردنەوەی تۆڕگەکەت

The collection of all your web pages is called your website. To publish your work (to make it visible to the world), you must copy your site to a web server.

کۆی هەموو پێی دەوترێت . بۆ کارەکەت (بۆ ئەوەی جیهان بیبینێت)، دەبێت کۆپی بکەیت بۆ سەر .

Definitionپێناسە

A group of related under one , such as a university's site.

کۆمەڵێک پەیوەندیدارە کە هەموویان لەسەر یەک دانراون، وەک تۆڕگەی زانکۆیەک.

The course says the most common way is to use an Internet Service Provider (): a company that sells Internet services. What do these companies offer?

کۆرسەکە دەڵێت باوترین ڕێگا بەکارهێنانی ـە: کۆمپانیایەک کە خزمەتگوزارییەکانی دەفرۆشێت. ئەم کۆمپانیایانە چی پێشکەش دەکەن؟

  • A common Internet service is web hosting: keeping your website on their web server.
  • Web hosting normally includes email services, for example an address like info@dilanbakery.com.
  • Web hosting often includes domain name registration: renting your own name, such as dilanbakery.com.
  • خزمەتگوزارییەکی باوی ـە: هەڵگرتنی لەسەر خۆیان.
  • بە ئاسایی خزمەتگوزاریی یشی تێدایە، بۆ نموونە ناونیشانێکی وەک info@dilanbakery.com.
  • زۆرجار تۆمارکردنی یشی تێدایە: بەکرێگرتنی ناوێکی تایبەت بە خۆت، وەک dilanbakery.com.
Quick checkپشکنینی خێراWhat is web hosting? چییە؟

Publishing your website: web hostingبڵاوکردنەوەی تۆڕگەکەت: هۆستینگ

From your computer to the worldلە کۆمپیوتەرەکەتەوە بۆ جیهان

Three boxes from left to right. Your computer holds the files index.html, about.php and logo.png that you write. A green arrow labelled upload, by SFTP, FTP or control panel, goes to the middle box: the hosting company, your rented space on their web server, kept running, connected and backed up. A double arrow labelled Internet, requests and responses, joins it to visitors anywhere in the world on laptops, phones and computers. A note below says that for testing, XAMPP turns your own computer into a web server that you visit at http://localhost/, which nobody else can see.سێ سندوق لە چەپەوە بۆ ڕاست. کۆمپیوتەرەکەی خۆت فایلەکانی index.html، about.php و logo.png هەڵدەگرێت کە خۆت دەیاننووسیت. تیرێکی سەوز بە نووسینی بارکردن (بە SFTP، FTP یان پانێڵی کۆنترۆڵ) دەچێت بۆ سندوقی ناوەڕاست: کۆمپانیای هۆستینگ، شوێنی بەکرێگیراوی تۆ لەسەر ڕاژەکاری وێبی ئەوان کە بەردەوام کار دەکات، پەیوەستە و یەدەگی لێ دەگیرێت. تیرێکی دوولایەنە بە نووسینی ئینتەرنێت (داواکارییەکان و وەڵامەکان) بە سەردانکەرانی هەموو شوێنێکی جیهانەوە دەیبەستێتەوە، لەسەر لاپتۆپ، مۆبایل و کۆمپیوتەر. تێبینییەک لە خوارەوە دەڵێت بۆ تاقیکردنەوە، XAMPP کۆمپیوتەرەکەی خۆت دەکات بە ڕاژەکاری وێب کە لە http://localhost/ سەردانی دەکەیت و کەسی تر نایبینێت.
Publishing: you upload your files to a hosting company's web server, and visitors reach it over the Internet. For testing, XAMPP makes your own computer a web server.: فایلەکانت دەکەیت بۆ سەر کۆمپانیایەکی و سەردانکەران بەسەر پێی دەگەن. بۆ تاقیکردنەوە، کۆمپیوتەرەکەی خۆت دەکات بە .CêIT

Web server software: Apache, IIS and othersبەرنامەکانی ڕاژەکاری وێب: Apache، IIS و ئەوانی تر

Apache and IISApache و IIS

Every website sits on a computer known as a web server, and that computer runs web server software. The course introduces two of them:

هەموو لەسەر کۆمپیوتەرێکە کە پێی دەوترێت و ئەو کۆمپیوتەرە کارپێدەکات. کۆرسەکە دوویان دەناسێنێت:

  • Apache HTTP Server () is developed by the Apache Software Foundation. It is software and can be installed on almost all operating systems. It is one of the most popular web servers in the world.
  • Internet Information Services () is a high-performance web server from Microsoft. It runs on Windows.
  • ⁦Apache HTTP Server⁩ () لەلایەن ⁦Apache Software Foundation⁩ـەوە پەرەی پێدەدرێت. و دەتوانرێت لەسەر نزیکەی هەموو دابمەزرێت. یەکێکە لە بەناوبانگترین جیهان.
  • ⁦Internet Information Services⁩ () خێرا و بەتوانای مایکرۆسۆفتە. لەسەر Windows کار دەکات.
Definitionپێناسە

Software whose anyone may read, change and share for free. , and are open source.

جۆرە نەرمەکاڵایەکە کە هەموو کەسێک دەتوانێت کۆدەکانی بخوێنێتەوە، دەستکارییان بکات و بەخۆڕایی بڵاویان بکاتەوە. و و کۆدکراوەن.

Quick checkپشکنینی خێراWhich web server runs only on Windows?کام تەنها لەسەر Windows کار دەکات؟

Web server software: Apache, IIS and othersبەرنامەکانی ڕاژەکاری وێب: Apache، IIS و ئەوانی تر

Other web serversڕاژەکارەکانی وێبی تر

Common web server programs
Web serverMade byدروستکەرRuns onلەسەر چی کار دەکاتCostتێچوو
HTTP ServerApache Software FoundationAlmost every operating system: Linux, Windows, macOSنزیکەی هەموو : Linux، Windows، macOSFree, open sourceبەخۆڕایی،
MicrosoftWindows onlyتەنها WindowsComes with Windows (no separate price)لەگەڵ Windows دێت (تێچووی جیای نییە)
NginxIgor Sysoev; today the company F5ئیگۆر سیسۆیێڤ؛ ئەمڕۆ کۆمپانیای ⁦F5⁩Linux and other systems, also WindowsLinux و سیستەمەکانی تر، هەروەها WindowsFree, open sourceبەخۆڕایی،

URLs: the address of every pageURL: ناونیشانی هەموو لاپەڕەیەک

What is a URL?URL چییە؟

Every document on the Web has its own special address, called a URL (Uniform Resource Locator). You type it in the browser's address bar, or you click a link that contains it.

هەموو بەڵگەنامەیەک لەسەر ناونیشانێکی تایبەتی خۆی هەیە کە پێی دەوترێت ⁦(Uniform Resource Locator)⁩. لە دەینووسیت، یان کرتە لەسەر دەکەیت کە ئەو ناونیشانەی تێدایە.

  • Uniform: every URL is written in the same format, everywhere in the world.
  • Resource: anything you can open on the Web, such as a page, a picture, a video or a PDF file.
  • Locator: it tells where to find that thing.
  • Uniform (یەکگرتوو): هەموو لە هەموو جیهاندا بە هەمان شێوە دەنووسرێت.
  • Resource (سەرچاوە): هەر شتێک کە لەسەر بکرێتەوە، وەک لاپەڕەیەک، وێنەیەک، ڤیدیۆیەک یان فایلێکی PDF.
  • Locator (دۆزەرەوە): دەڵێت ئەو شتە لە کوێ بدۆزرێتەوە.
Definitionپێناسە

The full address of a resource on the Web. It has a scheme (https://), a , and often a , a and a .

ناونیشانی تەواوی سەرچاوەیەکە لەسەر وێب. لە پرۆتۆکۆڵ (https://)، و زۆرجار و و پێکدێت.

URLs: the address of every pageURL: ناونیشانی هەموو لاپەڕەیەک

The three parts of a URLسێ بەشەکەی URL

A complete URL is generally made of three parts:

تەواو بە گشتی لە سێ بەش پێکدێت:

The three parts of a URL (as in the course)سێ بەشەکەی (وەک لە کۆرسەکەدا)
PartبەشExampleنموونەWhat it tells the browserچی بە دەڵێت
The protocolhttp://How to talk to the server: with (or the secure )چۆن قسە لەگەڵ بکات: بە (یان پارێزراو)
The domain namegoogle.comWhich website, that is, which serverکام ، واتە کام
The absolute path ڕەها/folder/page.phpWhich file on that serverکام فایل لەسەر ئەو

Why is the path called absolute? It starts with /, and that first / means the top folder of the website (its root). So the path always starts from the same place. On your XAMPP server, the URL http://localhost/folder/page.php opens the file htdocs/folder/page.php.

بۆچی پێی دەوترێت ڕەها؟ بە / دەست پێدەکات و ئەو /ـە یەکەمە واتە بەرزترین (ڕەگەکەی، بە ئینگلیزی root). بۆیە هەمیشە لە هەمان شوێنەوە دەست پێدەکات. لەسەر ، http://localhost/folder/page.php فایلی htdocs/folder/page.php دەکاتەوە.

Quick checkپشکنینی خێراIn http://localhost/folder/page.php, what is /folder/page.php?لە http://localhost/folder/page.phpدا، /folder/page.php چییە؟

How Do URLs Work?Techquickie · Englishئینگلیزی · 447K viewsبینین · 15K likesلایک · Partبەشی 0:00–4:13 (ofلە 5:35)

Each part of a web address explained: scheme, domain name and top-level domain, path, query string and fragment.

هەر بەشێکی ڕوون دەکاتەوە: scheme، و ، ، و fragment.

Watch 0:00–4:13, the parts of a URL; ends before the sponsor

لە ⁦0:00⁩ تا ⁦4:13⁩ سەیر بکە: بەشەکانی ؛ پێش ڕیکلامی سپۆنسەر کۆتایی دێت.

URLs: the address of every pageURL: ناونیشانی هەموو لاپەڕەیەک

The optional partsبەشە ئارەزوومەندانەکان

The URL https://www.example.com:8080/folder/page.php?id=5#top is cut into seven boxes. Three green boxes are the parts from the course slides: https:// is the protocol (how to talk), example.com is the domain name (which website), and /folder/page.php is the path (which file on the server). Four dashed boxes are optional parts: www. is a sub-domain (part of the host name), :8080 is the port (which door, usually hidden), ?id=5 is the query string (extra data for the page) and #top is the fragment (a place inside the page). A note says the browser never sends the fragment to the server.URLـی https://www.example.com:8080/folder/page.php?id=5#top کراوە بە حەوت سندوق. سێ سندوقی سەوز ئەو بەشانەن کە لە سلایدەکانی کۆرسەکەدان: https:// پرۆتۆکۆڵە (چۆن قسە بکرێت)، example.com ناوی دۆمەینە (کام تۆڕگە) و /folder/page.php ڕێڕەوە (کام فایل لەسەر ڕاژەکارەکە). چوار سندوقی پچڕپچڕ بەشی ئارەزوومەندانەن: www. پێشگری دۆمەینە (بەشێک لە ناوی ڕاژەکارەکە)، :8080 پۆرتە (کام دەرگا، زۆرجار شاراوەیە)، ?id=5 زنجیرەی پرسە (دراوەی زیادە بۆ لاپەڕەکە) و #top بەشی #ـە (شوێنێک لەناو لاپەڕەکەدا). تێبینییەک دەڵێت تۆڕگەڕ هەرگیز ئەو بەشە نانێرێت بۆ ڕاژەکار.
All the parts a URL can have. The green ones are the three parts from the course; the dashed ones are optional.هەموو ئەو بەشانەی دەتوانێت هەیبێت. سەوزەکان ئەو سێ بەشەی کۆرسەکەن؛ پچڕپچڕەکان ئارەزوومەندانەن.CêIT
  • Port (:8080): which "door" on the server to knock on. Web servers normally use port 80 for http and 443 for https, so the browser hides it. You see it when a server uses another door, for example http://localhost:8080/ if Apache in XAMPP runs on port 8080.
  • Query string (?id=5): extra data for the page, written as name=value pairs and joined with &, as in ?id=5&lang=ckb. PHP reads it with $_GET; see Form handling with GET and POST.
  • Fragment (#top): a place inside the page. The browser jumps to the part of the page that has id="top". The browser keeps the fragment for itself and never sends it to the server.
  • (:8080): لە کام دەرگای بدرێت. بە ئاسایی ⁦80⁩ بۆ http و ⁦443⁩ بۆ https بەکار دەهێنن، بۆیە دەیشارێتەوە. کاتێک دەیبینیت کە دەرگایەکی تر بەکار بهێنێت، بۆ نموونە http://localhost:8080/ ئەگەر ناو لەسەر ⁦8080⁩ کار بکات.
  • (?id=5): دراوەی زیادە بۆ لاپەڕەکە، کە وەک جووتی name=value دەنووسرێت و بە & پێکەوە دەبەسترێن، وەک ?id=5&lang=ckb. بە $_GET دەیخوێنێتەوە؛ سەیری مامەڵەکردن لەگەڵ فۆرم بە GET و POST بکە.
  • بەشی # (#top): شوێنێک لەناو لاپەڕەکەدا. باز دەدات بۆ ئەو بەشەی لاپەڕەکە کە id="top"ـی هەیە. ئەم بەشە بۆ خۆی دەهێڵێتەوە و هەرگیز نایبات بۆ .
Quick checkپشکنینی خێراNo port is written in https://www.example.com/. Which port does the browser use?لە https://www.example.com/دا هیچ نەنووسراوە. کام بەکار دەهێنێت؟

URLs: the address of every pageURL: ناونیشانی هەموو لاپەڕەیەک

Peek ahead: PHP can split a URLسەیرێکی پێشوەختە: PHP دەتوانێت URL دابەش بکات

Domain names and DNSناوەکانی دۆمەین و DNS

Domain namesناوەکانی دۆمەین

A domain name is a unique name for a website, like google.com. No two websites in the world can have the same domain name.

ناوێکی بێهاوتایە بۆ ، وەک google.com. هیچ دوو لە جیهاندا ناتوانن هەمان هەبێت.

Read a domain name from right to left. In www.dilanbakery.com:

لە ڕاستەوە بۆ چەپ بخوێنەوە. لە www.dilanbakery.comدا:

  • .com is the ending, called the top-level domain. Others are .org, .net and .edu, and country endings such as .iq (Iraq) and .krd (Kurdistan).
  • dilanbakery is the name the owner chose and registered. You rent it every year, often together with your web hosting.
  • www is a prefix that names one server of that domain. Many sites work with or without it.
  • .com کۆتاییەکەیە، کە پێی دەوترێت . ئەوانی تر .org، .net و .eduـن و کۆتایی وڵاتان وەک .iq (عێراق) و .krd (کوردستان).
  • dilanbakery ئەو ناوەیە کە خاوەنەکەی هەڵیبژاردووە و بە ناوی خۆیەوە گرتوویەتی. هەموو ساڵێک بە کرێی دەگریت، زۆرجار لەگەڵ .
  • www پێشگرێکە کە ناوی یەکێک لە ئەو دۆمەینە دەنێت. زۆر بە www و بەبێ ئەویش کار دەکەن.

The first generic endings were made for different kinds of owners: .com commercial (companies), .org organisations, .net network providers, .edu education, .gov government, .mil the military and .int international organisations set up by treaties. Today anyone may register a .com, .org or .net name, while .edu, .gov and .mil are still kept for US colleges, government and military.

یەکەم ، کە پێیان دەوترێت گشتی ⁦(generic)⁩، بۆ جۆری جیاوازی خاوەن دانرابوون: .com بازرگانی (کۆمپانیاکان)، .org ڕێکخراوەکان، .net دابینکەرانی ، .edu پەروەردە و خوێندن، .gov حکومەت، .mil سوپا و .int ڕێکخراوە نێودەوڵەتییەکان کە بە پەیماننامە دامەزراون. ئەمڕۆ هەموو کەس دەتوانێت ناوێکی .com، .org یان .net تۆمار بکات، بەڵام .edu، .gov و .mil هێشتا تایبەتن بە کۆلێژ، حکومەت و سوپای ئەمریکا.

Quick checkپشکنینی خێراIn www.aramtravel.krd, what is .krd?لە www.aramtravel.krdدا، .krd چییە؟

Quick checkپشکنینی خێراThe .com ending was first meant for:کۆتایی .com لە سەرەتادا بۆ چی دانرابوو؟

Domain names and DNSناوەکانی دۆمەین و DNS

DNS: the Internet's phone bookDNS: دەفتەری تەلەفۆنی ئینتەرنێت

Computers, however, do not find each other by name. They use numbers: every server on the Internet has an IP address, such as 203.0.113.10. So a domain name must be translated into an IP address. This is the job of DNS, the Domain Name System.

بەڵام کۆمپیوتەرەکان بە ناو یەکتر نادۆزنەوە. ژمارە بەکار دەهێنن: هەموو لەسەر ـی هەیە، وەک 203.0.113.10. کەواتە دەبێت وەربگێڕدرێت بۆ . ئەمە کاری ـە، واتە ⁦Domain Name System⁩.

Definitionپێناسە

The Internet's phone book. It turns a such as example.com into the of the server, so the browser can connect to it.

وەک دەفتەری تەلەفۆن وایە بۆ . وەک example.com دەگۆڕێت بۆ ، بۆ ئەوەی بتوانێت پەیوەندیی پێوە بکات.

Your phone contactsلیستی ناوەکانی مۆبایلەکەت

DNS works like the contacts list in your phone. You tap "Aram", not 0750 000 0000; the phone looks up the number and dials it for you. In the same way you type example.com, and DNS finds the server's number.

وەک لیستی ناوەکانی ناو مۆبایلەکەت کار دەکات. تۆ کرتە لەسەر «ئارام» دەکەیت، نەک لەسەر ⁦0750 000 0000⁩؛ مۆبایلەکە ژمارەکە دەدۆزێتەوە و بۆت لێدەدات. بە هەمان شێوە تۆ example.com دەنووسیت و ژمارەی دەدۆزێتەوە.

Where the analogy stops workingسنووری ئەم نموونەیە

Your phone has one contacts list, but DNS is not one book on one computer. It is millions of DNS servers around the world, each responsible for some of the names, and your computer remembers recent answers for a while.

مۆبایلەکەت یەک لیستی ناوی هەیە، بەڵام یەک دەفتەر نییە لەسەر یەک کۆمپیوتەر. ملیۆنان لە سەرانسەری جیهاندا، هەر یەکەیان بەرپرسیاری هەندێک لە ناوەکانە و کۆمپیوتەرەکەت ئەنجامە نوێیەکان بۆ ماوەیەک لە بیر دەگرێت.

Quick checkپشکنینی خێراWhat does DNS do? چی دەکات؟

How a DNS Server (Domain Name System) works.PowerCert Animated Videos · Englishئینگلیزی · 5.7M viewsبینین · 111K likesلایک

See how DNS works like a phone book, turning a domain name such as google.com into the IP address your computer needs.

ببینە چۆن وەک دەفتەری تەلەفۆن کار دەکات: وەک google.com دەگۆڕێت بۆ ، کە پێویستی پێیەتی.

Whole video: how DNS turns a name into an IP address

هەموو ڤیدیۆکە: چۆن ناوێک دەگۆڕێت بۆ .

Domain names and DNSناوەکانی دۆمەین و DNS

Choosing a good domain nameهەڵبژاردنی ناوێکی دۆمەینی باش

A domain name should be short, meaningful and clear, so people can remember it and type it without mistakes.

دەبێت کورت، بەمانا و ڕوون بێت، بۆ ئەوەی خەڵک لە بیریان بمێنێت و بەبێ نادروستی بینووسن.

Choosing a domain nameهەڵبژاردنی
BetterباشترWorseخراپترWhyبۆچی
dilanbakery.comthe-best-bakery-of-dilan-in-erbil-2026.comShort is easier to remember and type.کورت ئاسانترە بۆ لەبیرکردن و نووسین.
aramtravel.comat-x7.comA meaningful name says what the site is about.ناوێکی بەمانا دەڵێت دەربارەی چییە.
shilanbooks.comshilan-bookz4u.comClear spelling: no strange letters, numbers or many hyphens.نووسینی ڕوون: بێ پیتی سەیر، ژمارە یان چەندین هێڵی بچووک.

Putting it together: from URL to pageهەمووی پێکەوە: لە URLـەوە بۆ لاپەڕە

Now you know all the players. Here is what happens, in order, when you type www.example.com/page.php and press Enter.

ئێستا هەموو بەشدارەکان دەناسیت. ئەمە ئەو شتەیە کە بە ڕیز ڕوودەدات، کاتێک www.example.com/page.php دەنووسیت و Enter دادەگریت.

The browser on the user's computer is on the left, a DNS server (the Internet's phone book) is at the top, and a web server with the IP address 203.0.113.10 is on the right. Step 1: the browser asks the DNS server for the IP address of www.example.com. Step 2: the DNS server answers 203.0.113.10. Step 3: the browser sends a request to 203.0.113.10 asking for /page.php. Step 4: the web server sends back a response with the page as HTML. Step 5: the browser reads the HTML and draws the page. Steps 1 and 2 happen only when the browser does not already know the IP address.تۆڕگەڕی سەر کۆمپیوتەری بەکارهێنەر لە لای چەپە، ڕاژەکارێکی DNS (دەفتەری تەلەفۆنی ئینتەرنێت) لە سەرەوەیە و ڕاژەکارێکی وێب بە ناونیشانی IPـی 203.0.113.10 لە لای ڕاستە. هەنگاوی ١: تۆڕگەڕەکە لە ڕاژەکاری DNS دەپرسێت ناونیشانی IPـی www.example.com چییە. هەنگاوی ٢: ڕاژەکاری DNS دەڵێت 203.0.113.10. هەنگاوی ٣: تۆڕگەڕەکە داواکارییەک دەنێرێت بۆ 203.0.113.10 و داوای /page.php دەکات. هەنگاوی ٤: ڕاژەکاری وێبەکە وەڵامێک دەنێرێتەوە کە لاپەڕەکەی بە HTML تێدایە. هەنگاوی ٥: تۆڕگەڕەکە HTMLـەکە دەخوێنێتەوە و لاپەڕەکە دەکێشێت. هەنگاوەکانی ١ و ٢ تەنها کاتێک ڕوودەدەن کە تۆڕگەڕەکە پێشتر ناونیشانی IPـیەکە نەزانێت.
Browser, DNS server and web server: how a page gets from a server onto your screen.، و : لاپەڕەیەک چۆن لە دەگاتە سەر شاشەکەت.CêIT
  1. Find the serverڕاژەکارەکە بدۆزەرەوە

    The browser asks a DNS server for the IP address of www.example.com and gets back a number, such as 203.0.113.10.

    لە داوای www.example.com دەکات و ژمارەیەک وەردەگرێتەوە، وەک 203.0.113.10.

  2. Ask for the pageداوای لاپەڕەکە بکە

    The browser sends a request to that IP address: "please send me /page.php".

    دەنێرێت بۆ ئەو : «تکایە /page.phpم بۆ بنێرە».

  3. The server answersڕاژەکارەکە وەڵام دەداتەوە

    The web server finds the file and sends back a response that contains HTML. (For a .php file the server first runs the PHP code; you will see this in the next lecture.)

    فایلەکە دەدۆزێتەوە و دەنێرێتەوە کە تێدایە. (بۆ فایلێکی .php، سەرەتا کۆدی جێبەجێ دەکات؛ لە وانەی داهاتوودا ئەمە دەبینیت.)

  4. Draw the pageلاپەڕەکە بکێشە

    The browser reads the HTML tags and draws the page on your screen.

    دەخوێنێتەوە و لاپەڕەکە لەسەر شاشەکەت دەکێشێت.

The full story of the request and the response, and what PHP does on the server, is in HTTP and the request–response cycle.

چیرۆکی تەواوی و و ئەوەی لەسەر دەیکات، لە وانەی دواتردایە: HTTP.

Common mistakesئەو هەڵانەی زۆرجار دەکرێن

  • Using backslashes in URLs. Windows folder paths use backslashes, as in C:\xampp\htdocs, but URLs always use forward slashes /: write http://localhost/shop/index.php.
  • Spaces in file names. A file called my page.html gets the address my%20page.html. Use names like my-page.html instead.
  • Capital letters and odd characters in file names. Use only a–z, 0–9, -, _ and ., and write file names in lowercase. On Linux, the usual system of hosting servers, file names are case-sensitive: About.html and about.html are two different files. A page with url('p.jpg') shows its picture on Windows, but not on a Linux host if the file is really called p.JPG.
  • Mixing up the domain name and the IP address. example.com is the name; 203.0.113.10 is the number. DNS connects them; it does not store your website.
  • Thinking a web server is a special kind of machine. Any computer that runs web server software (such as Apache) is a web server, including your own laptop with XAMPP.
  • Writing "HTTP" in capitals inside a URL, or forgetting ://. Write http:// or https://.
  • بەکارهێنانی هێڵی لار بەرەو دواوە لە . Windows هێڵی لاری بەرەو دواوە بەکار دەهێنن، وەک C:\xampp\htdocs، بەڵام هەمیشە / بەکار دەهێنێت: بنووسە http://localhost/shop/index.php.
  • بۆشایی لە ناوی فایلدا. فایلێک بە ناوی my page.html ناونیشانی my%20page.html وەردەگرێت. لە جیاتی ئەوە ناوی وەک my-page.html بەکار بهێنە.
  • پیتی گەورە و نیشانەی نامۆ لە ناوی فایلدا. تەنها a–z، 0–9، -، _ و . بەکار بهێنە و ناوی فایلەکان بە پیتی بچووک بنووسە. لەسەر لینوکس، کە سیستەمی ئاسایی ، ناوی فایل : About.html و about.html دوو فایلی جیاوازن. لاپەڕەیەک کە url('p.jpg')ـی تێدایە وێنەکەی لەسەر ویندۆز پیشان دەدات، بەڵام لەسەر لینوکس نا، ئەگەر ناوی ڕاستەقینەی فایلەکە p.JPG بێت.
  • تێکەڵکردنی و . example.com ناوەکەیە؛ 203.0.113.10 ژمارەکەیە. پێکەوەیان دەبەستێتەوە؛ هەڵناگرێت.
  • وا بزانیت جۆرێکی تایبەتی ئامێرە. هەر کۆمپیوتەرێک کە کارپێبکات (وەک ) ، تەنانەت لاپتۆپەکەی خۆت بە .
  • نووسینی «HTTP» بە پیتی گەورە لەناو ، یان لەبیرکردنی ://. بنووسە http:// یان https://.

Quick check and exercisesپشکنینی خێرا و ڕاهێنان

ExerciseڕاهێنانQuestion 1: the parts of a URLپرسیاری ١: بەشەکانی URL

What are the three parts of a complete URL? Name them for http://www.example.com/page.php.

سێ بەشەکەی تەواو چین؟ بۆ http://www.example.com/page.php ناویان بهێنە.

Show answerوەڵامەکە پیشان بدە

The protocol (http://), the domain name (www.example.com) and the absolute path (/page.php).

(http://)، (www.example.com) و ڕەها (/page.php).

ExerciseڕاهێنانExercise 2: take a URL apartڕاهێنانی ٢: URLێک لێک بکەرەوە

Label every part of this URL: https://shop.example.com:8443/books/list.php?page=2&sort=price#results. Which part does the server never receive?

هەموو بەشێکی ئەم دیاری بکە: https://shop.example.com:8443/books/list.php?page=2&sort=price#results. کام بەش هەرگیز وەرناگرێت؟

Show answerوەڵامەکە پیشان بدە
PartبەشValueچی تێدایە
Protocolhttps://
Domain name (with the prefix shop) (لەگەڵ پێشگری shop)shop.example.com
Port:8443
Path/books/list.php
Query string (two pairs: page=2 and sort=price) (دوو جووت: page=2 و sort=price)?page=2&sort=price
Fragmentبەشی ##results

The server never receives the fragment #results. The browser keeps it and uses it to jump to the part of the page with id="results".

هەرگیز بەشی #results وەرناگرێت. بۆ خۆی دەیهێڵێتەوە و بەکاری دەهێنێت بۆ ئەوەی باز بدات بۆ ئەو بەشەی لاپەڕەکە کە id="results"ـی هەیە.

ExerciseڕاهێنانExercise 3: a name for a shopڕاهێنانی ٣: ناوێک بۆ دوکانێک

Hana opens a flower shop in Sulaymaniyah and wants a website. She likes these names: hana-flowers.com, the-most-beautiful-flowers-shop-of-hana.com, hf-x9z.com. Which is best, and why?

هانا دوکانێکی گوڵ لە سلێمانی دەکاتەوە و دەوێت. ئەم ناوانەی بەدڵە: hana-flowers.com، the-most-beautiful-flowers-shop-of-hana.com، hf-x9z.com. کامیان باشترە و بۆچی؟

Show answerوەڵامەکە پیشان بدە

hana-flowers.com is best: it is short, meaningful and clear. The second one is far too long, and the third one means nothing and is easy to mistype.

hana-flowers.com باشترینە: کورت، بەمانا و ڕوونە. دووەمیان زۆر درێژە و سێیەمیان هیچ مانایەکی نییە و ئاسانە بە نادروستی بنووسرێت.

ExerciseڕاهێنانExercise 4: who does what?ڕاهێنانی ٤: کێ چی دەکات؟

Put these in the right order, and say which machine does each step: (a) the page is drawn; (b) the IP address is found; (c) the HTML is sent back; (d) the request for /page.php is sent.

ئەمانە بە دروستی ڕێک بخە و بڵێ هەر هەنگاوێک کام ئامێر دەیکات: (أ) لاپەڕەکە دەکێشرێت؛ (ب) دەدۆزرێتەوە؛ (ج) دەنێردرێتەوە؛ (د) بۆ /page.php دەنێردرێت.

Show answerوەڵامەکە پیشان بدە
  1. (b) The IP address is found: the browser asks a DNS server.
  2. (d) The request is sent: by the browser (the client).
  3. (c) The HTML is sent back: by the web server.
  4. (a) The page is drawn: by the browser.
  1. (ب) دەدۆزرێتەوە: لە دەپرسێت.
  2. (د) دەنێردرێت: لەلایەن ().
  3. (ج) دەنێردرێتەوە: لەلایەن .
  4. (أ) لاپەڕەکە دەکێشرێت: لەلایەن .
ExerciseڕاهێنانExercise 5: server, browser or website?ڕاهێنانی ٥: ڕاژەکار، تۆڕگەڕ یان تۆڕگە؟

Compare a web server, a web browser and a website. Answer in a table: what each one is, where it runs or lives, and one example.

، و بەراورد بکە. لە خشتەیەکدا وەڵام بدەرەوە: هەر یەکەیان چییە، لە کوێ کار دەکات یان لە کوێ هەڵگیراوە و نموونەیەک.

Hintئاماژە

Exams like to ask this as a three-column table. Think of who asks, who answers, and what is sent.

تاقیکردنەوەکان حەز دەکەن ئەمە وەک خشتەیەکی سێ ستوونی بپرسن. بیر بکەرەوە کێ داوا دەکات، کێ وەڵام دەداتەوە و چی دەنێردرێت.

Show answerوەڵامەکە پیشان بدە
CompareبەراوردWeb serverWeb browserWebsite
What is it?چییە؟Software (and the computer running it) that stores web files and sends them when a browser asksنەرمەواڵەیەک (و ئەو کۆمپیوتەرەی کاری پێدەکات) کە فایلەکانی وێب هەڵدەگرێت و کاتێک داوا دەکات دەیاننێرێتA program that requests pages and draws them on the screen کە داوای لاپەڕە دەکات و لەسەر شاشە پیشانیان دەداتA collection of related web pages under one domain nameکۆمەڵێک پەیوەندیدار لە ژێر یەک
Where?لە کوێ؟On a server computer, usually in a data centre (or on your laptop with XAMPP)لەسەر کۆمپیوتەرێکی ، زۆرجار لە سەنتەری دراوەدا (یان لەسەر لاپتۆپەکەت بە XAMPP)On the visitor's computer or phoneلەسەر کۆمپیوتەر یان مۆبایلی سەردانکەرStored on a web server, viewed in a browserلەسەر هەڵگیراوە و لە دەبینرێت
ExampleنموونەApache, Nginx, IISApache، Nginx، IISFirefox, Chrome, Safari, EdgeFirefox، Chrome، Safari، Edgedilanbakery.com

Summary and reviewکورتە و پێداچوونەوە

  • A web browser (the client) asks for pages, reads their HTML tags and draws them. Today's main browsers are Chrome, Edge, Firefox and Safari.
  • A web server (the server) stores websites and sends the files when a browser asks.
  • To publish a website you copy it to a web server, usually by renting web hosting, which often includes email and domain name registration. XAMPP makes your own computer a server for testing (localhost).
  • Two web servers in the course: Apache (free, open source, almost every OS, installed by XAMPP) and IIS (Microsoft, Windows).
  • A URL has a protocol, a domain name and an absolute path, and can also have a port, a query string and a fragment.
  • DNS (Domain Name System) turns a domain name into the server's IP address. A good domain name is short, meaningful and clear.
  • () داوای لاپەڕە دەکات، دەخوێنێتەوە و دەیانکێشێت. ئەمڕۆ Chrome، Edge، Firefox و Safariـن.
  • () هەڵدەگرێت و کاتێک داوا دەکات، فایلەکان دەنێرێت.
  • بۆ ، کۆپیی دەکەیت بۆ سەر ، بە زۆری بە بەکرێگرتنی ، کە زۆرجار و تۆمارکردنی تێدایە. کۆمپیوتەرەکەی خۆت دەکات بە بۆ تاقیکردنەوە ().
  • دوو لە کۆرسەکەدا: (بەخۆڕایی، ، نزیکەی هەموو ، دایدەمەزرێنێت) و (مایکرۆسۆفت، Windows).
  • ، و ڕەهای هەیە و دەتوانێت ، و بەشی #ـیشی هەبێت.
  • ⁦(Domain Name System)⁩ دەگۆڕێت بۆ . باش کورت، بەمانا و ڕوونە.
Review questionsپرسیارەکانی پێداچوونەوە
How does a browser know how to show a page?تۆڕگەڕ چۆن دەزانێت لاپەڕەیەک چۆن پیشان بدات؟

It reads the HTML tags in the file: they are display instructions such as <h1> for a heading.

ناو فایلەکە دەخوێنێتەوە: ڕێنمایی پیشاندانن، وەک <h1> بۆ سەردێڕ.

Which machine is the client and which is the server?کام ئامێر ڕاژەخوازە و کامیان ڕاژەکار؟

The browser is the client (it asks); the web server is the server (it answers).

(داوا دەکات)؛ ( دەداتەوە).

What three things does web hosting usually give you?هۆستینگ بە ئاسایی چ سێ شتێکت پێدەدات؟

Space on a web server that is kept running, connected and backed up; email services; and often domain name registration.

شوێنێک لەسەر کە بەردەوام کار دەکات، پەیوەستە و یەدەگی لێ دەگیرێت؛ خزمەتگوزاریی ؛ و زۆرجار تۆمارکردنی .

Is Apache the only free web server?ئایا Apache تاکە ڕاژەکاری وێبی بەخۆڕاییە؟

No. Nginx, Caddy, Lighttpd and OpenLiteSpeed are also free and open source.

نەخێر. Nginx، Caddy، Lighttpd و OpenLiteSpeedیش بەخۆڕایی و .

Why does the Internet need DNS?بۆچی ئینتەرنێت پێویستی بە DNS هەیە؟

Because computers find each other by number (IP address), but people remember names.

چونکە کۆمپیوتەرەکان بە ژمارە () یەکتر دەدۆزنەوە، بەڵام خەڵک ناوەکانیان لە بیر دەمێنێت.

What does localhost mean?localhost واتای چییە؟

"This computer": the IP address 127.0.0.1. With XAMPP, http://localhost/ opens the web server on your own machine.

«ئەم کۆمپیوتەرە»: 127.0.0.1. بە ، http://localhost/ سەر ئامێرەکەی خۆت دەکاتەوە.

Videoڤیدیۆ

Watch a videoسەیری ڤیدیۆیەک بکە

A video that viewers liked a lot and praised in their comments, chosen for this lesson.ڤیدیۆیەک کە بینەران زۆریان پێ خۆش بووە و لە کۆمێنتەکانیاندا ستایشیان کردووە، بۆ ئەم وانەیە هەڵبژێردراوە.

How The Web Works - The Big PictureAcademind · Englishئینگلیزی · 688K viewsبینین · 22K likesلایک · Partبەشی 0:00–7:46 (ofلە 12:25)

The big picture: the browser asks a server for a page, finds it by its domain, and gets HTML back over HTTP.

وێنەیەکی گشتی: داوای لە دەکات، بە دەیدۆزێتەوە و لە ڕێگەی وەردەگرێتەوە.

Watch 0:00–7:46, browser to server and back

لە ⁦0:00⁩ تا ⁦7:46⁩ سەیر بکە: لە بۆ و گەڕانەوە.

Lesson complete!وانەکە تەواو بوو!

Well done. Review the key terms, then go on to the next lesson.دەستخۆش. سەیرێکی زاراوە سەرەکییەکان بکەرەوە، پاشان بڕۆ بۆ وانەی داهاتوو.

Key termsزاراوە سەرەکییەکان

Next lessonوانەی داهاتوو

HTTP and the Request–Response CycleHTTP و سووڕی داواکاری و وەڵام

References and further readingسەرچاوەکان و خوێندنەوەی زیاتر

This lecture is a first edition. The Kurdish text and terminology are waiting for review by Kurdish IT teachers.ئەم وانەیە چاپی یەکەمە. دەقە کوردییەکە و زاراوەکانی چاوەڕێی پێداچوونەوەی مامۆستایانی کوردی بواری IT ن.