DNS Flashcards
DNS
DNS REQUEST
DNS
LOAD BALANCER
CDN
CONTENT DELIVERY NETWORK
IP ADDRESS
FORMAT
ISP
INTERNET SERVICE PROVIDER
WHAT IS A WEB SERVER
STATIC CONTENT
DYNAMIC CONTENT
FRONT END
BACK END
VIRTUAL HOST
LAN
VPN
ETHERNET
ROOT DNS SERVER
The root servers act as the DNS backbone of the internet; their job is to redirect you to the correct Top Level Domain Server, depending on your request. If, for example, you requestwww.tryhackme.com, the root server will recognise the Top Level Domain of .com and refer you to the correct TLD server that deals with .com addresses.
RECURSIVE DNS SERVER
A Recursive DNS Server is usually provided by your ISP, but you can also choose your own. This server also has a local cache of recently looked up domain names. If a result is found locally, this is sent back to your computer, and your request ends here (this is common for popular and heavily requested services such as Google, Facebook, Twitter). If the request cannot be found locally, a journey begins to find the correct answer, starting with the internet’s root DNS servers.
AUTHORITATIVE DNS SERVER
An authoritative DNS server is the server that is responsible for storing the DNS records for a particular domain name and where any updates to your domain name DNS records would be made. Depending on the record type, the DNS record is then sent back to the Recursive DNS Server, where a local copy will be cached for future requests and then relayed back to the original client that made the request. DNS records all come with a TTL (Time To Live) value. This value is a number represented in seconds that the response should be saved for locally until you have to look it up again. Caching saves on having to make a DNS request every time you communicate with a server.
COMMON HTML REQUEST HEADERS
HOST
USER-AGENT
CONTENT-LENGTH
ACCEPT-ENCODING
COOKIE
HOST
Host:Some web servers host multiple websites so by providing the host headers you can tell it which one you require, otherwise you’ll just receive the default website for the server.
USER-AGENT
User-Agent:This is your browser software and version number, telling the web server your browser software helps it format the website properly for your browser and also some elements of HTML, JavaScript and CSS are only available in certain browsers.
CONTENT-LENGTH
Content-Length:When sending data to a web server such as in a form, the content length tells the web server how much data to expect in the web request. This way the server can ensure it isn’t missing any data.
ACCEPT-ENCODING
Accept-Encoding:Tells the web server what types of compression methods the browser supports so the data can be made smaller for transmitting over the internet.
COOKIE
Cookie:Data sent to the server to help remember your information (see cookies task for more information).
COMMON HTTP RESPONSE HEADERS
SET-COOKIE
CACHE-CONTROL
CONTENT-TYPE
CONTENT-ENCODING
SET-COOKIE
Set-Cookie:Information to store which gets sent back to the web server on each request (see cookies task for more information).
CACHE-CONTROL
Cache-Control:How long to store the content of the response in the browser’s cache before it requests it again.
CONTENT-TYPE
Content-Type:This tells the client what type of data is being returned, i.e., HTML, CSS, JavaScript, Images, PDF, Video, etc. Using the content-type header the browser then knows how to process the data.
CONTENT-ENCODING
Content-Encoding:What method has been used to compress the data to make it smaller when sending it over the internet.
HTTP STATUS CODES
500-599
SERVER ERRORS
This is reserved for errors happening on the server-side and usually indicate quite a major problem with the server handling the request.
HTTP STATUS CODES
400-499
CLIENT ERRORS
Used to inform the client that there was an error with their request.
HTTP STATUS CODES
300-399
REDIRECTION
These are used to redirect the client’s request to another resource. This can be either to a different webpage or a different website altogether.
HTTP STATUS CODES
200-299
SUCCESS
This range of status codes is used to tell the client their request was successful.
HTTP STATUS CODES
100-199
INFORMATION RESPONSE
These are sent to tell the client the first part of their request has been accepted and they should continue sending the rest of their request. These codes are no longer very common.
COMMON STATUS CODES
201
CREATED
A resource has been created (for example a new user or new blog post).
COMMON STATUS CODES
200
OK
The request was completed successfully.
COMMON STATUS CODES
301
MOVED PERMANENTLY
This redirects the client’s browser to a new webpage or tells search engines that the page has moved somewhere else and to look there instead.