HTTP Protocol MCQs: 12 Solved Questions with Explanations

Solve 12 HTTP Protocol questions on state, ports, methods, status codes, cookies, connections and RTTs. Each answer explains the decisive clue and the close distractors.

KnowledgeGate Team

Exam prep & CS education

Updated 9 Nov 20268 min read
HTTP Protocol MCQs: 12 Solved Questions with Explanations

HTTP questions often begin with direct recall, then move quickly into close distractors about methods, status codes, cookies, persistent connections and RTT counting. The decisive distinctions are protocol state versus application state, method semantics, status-code families, resource counts and connection timing. Attempt each one before reading its explanation. Keep a one-line error log labelled term, method/status, resource/connection or RTT, and use it to direct your GATE CS preparation.

1. Use the set in two passes, not as a reading list

On the first pass, use no notes. Mark one answer for an MCQ, but judge every option independently in an MSQ. Record only the question number and confidence: high, medium or low.

On the second pass, explain why the answer works and identify the exact word or assumption that breaks each close distractor. Log a correct guess if its reasoning was weak. If the theory itself feels uncertain, review Application Layer Protocols: DNS and HTTP first, then return here to solve.

2. HTTP identity, state and ports: Questions 1-3

Question 1: Stateless does not mean session data is impossible

BPSC 2024, MCQ.

With respect to maintaining session state between requests, what type of protocol is HTTP?

  • (a) Stateful

  • (b) Stateless

  • (c) Transfer protocol

  • (d) More than one of the above

  • (e) None of the above

Answer: (b) Stateless. HTTP treats requests independently. Cookies, tokens or server records can preserve application context without making HTTP stateful. "Transfer protocol" does not answer the state question. Review the solved question.

Question 2: Read the final letter precisely

Bihar STET 2025, MCQ.

The letter S in the abbreviation HTTPS in context of Networking protocols, stands for:

  • (a) Single

  • (b) Static

  • (c) Secure

  • (d) Sensitive

Answer: (c) Secure. HTTPS protects browser-server communication. The distractors are not in the expansion, and HTTPS does not remove other application vulnerabilities. Review the solved question.

Question 3: Match each familiar port before selecting 80

RSSB 2022, MCQ.

What is the port number of the HTTP?

  • (a) 80

  • (b) 25

  • (c) 20/21

  • (d) 23

Answer: (a) 80. Memorise one row: HTTP 80, SMTP 25, FTP 20/21, Telnet 23. It makes elimination reliable. Review the solved question.

3. Methods and status-code families: Questions 4-6

Question 4: OPTIONS asks what communication is available

TPSC 2024, Assistant CEO, MCQ.

In the context of the HTTP protocol, what is the primary purpose of the OPTIONS method ?

  • (a) To request information about the communication options available

  • (b) To request a representation of a specified resource

  • (c) To submit data to be processed to a specified resource

  • (d) To retrieve data from a specified resource

Answer: (a). OPTIONS asks what communication is supported. Representation retrieval is GET; submitting data for processing is POST. Review the solved question.

Question 5: The first digit identifies the error side

IBPS 2025, MCQ.

Which HTTP status code represents an Internal Server Error?

  • (a) 200

  • (b) 301

  • (c) 404

  • (d) 500

  • (e) 403

Answer: (d) 500. First classify the family: 2xx success, 3xx redirection, 4xx client or resource problem, 5xx server failure. Specifically, 200 is success, 301 redirection, 404 not found, 403 forbidden and 500 internal server error. Review the solved question.

Question 6: Permanent movement is 301, not 404

UP Police 2023, Paper 2 Subject Oriented, MCQ.

Which HTTP status code is returned when a requested web page is permanently moved to a new URL ?

  • (a) 200

  • (b) 500

  • (c) 301

  • (d) 404

Answer: (c) 301. Permanently signals 301 Moved Permanently. The others mean success (200), server failure (500) and not found (404). Review the solved question.

4. HTTP carries resources; HTML structures them: Questions 7-8

The earlier Application Layer MCQ survey uses Questions 7, 9 and 10 inside a DNS, email and web-protocol comparison. Here the same questions anchor the narrower HTTP distinctions between transfer and structure, cookie semantics, resources and TCP connections before the RTT problems.

Question 7: Separate transfer protocol from page language

GATE 2004, Information Technology, MCQ.

Which one of the following statements is FALSE?

  • (a) HTTP runs over TCP

  • (b) HTTP describes the structure of web pages

  • (c) HTTP allows information to be stored in a URL

  • (d) HTTP can be used to test the validity of a hypertext link

Answer: (b). Here, HTTP transfers requests and resources; HTML describes page structure. URLs can carry information, and an HTTP response status can show whether a link resolves. Review the solved question.

Question 8: Parse a URL from left to right

DSSSB 2021, TGT Shift 4, MCQ.

Which of the following is a part(s) of a URL?

I. Protocol

II. Hostname

III. Directory and Filename

  • (a) I and III

  • (b) II and III

  • (c) I and II

  • (d) I, II and III

Answer: (d) I, II and III. Parse left to right: protocol = https | hostname = www.example.com | directory and filename = /folder/file.html. Review the solved question.

5. Cookies, resources and connections: Questions 9-10

GATE 2015, Set 2, MCQ.

Which one of the following statements is NOT correct about HTTP cookies?

  • (a) A cookie is a piece of code that has the potential to compromise the security of an Internet user

  • (b) A cookie gains entry to the user’s work area through an HTTP header

  • (c) A cookie has an expiry date and time

  • (d) Cookies can be used to track the browsing pattern of a user at a particular site

Answer: (a). A cookie is stored data, not code. Headers carry it; it can expire and support tracking. Privacy risk does not make it code. Review the solved question.

Question 10: Count resources first, connections second

GATE 2014, Set 2, MCQ.

A graphical HTML browser resident at a network client machine Q accesses a static HTML webpage from a HTTP server S. The static HTML page has exactly one static embedded image which is also at S. Assuming no caching, which one of the following is correct about the HTML webpage loading (including the embedded image)?

  • (a) Q needs to send at least 2 HTTP requests to S, each necessarily in a separate TCP connection to server S

  • (b) Q needs to send at least 2 HTTP requests to S, but a single TCP connection to server S is sufficient

  • (c) A single HTTP request from Q to S is sufficient, and a single TCP connection between Q and S is necessary for this

  • (d) A single HTTP request from Q to S is sufficient, and this is possible without any TCP connection between Q and S

Answer: (b). 1 HTML file + 1 image = 2 resources, hence at least 2 HTTP requests. One persistent TCP connection to S can carry both. Review the solved question.

6. Persistent HTTP, pipelining and RTT accounting: Questions 11-12

Question 11: Evaluate every HTTP/1.1 statement independently

GATE 2026, Set 1, MSQ.

Which of the following statements is/are true with respect to the interaction of a web browser with a web server using HTTP 1.1?

  • (a) HTTP 1.1 facilitates downloading multiple objects of the same webpage over the same TCP connection, if the objects are stored in the same server

  • (b) HTTP 1.1 facilitates downloading multiple objects of the same webpage over the same TCP connection, even if they are stored in different servers

  • (c) HTTP 1.1 facilitates sending a request for downloading one object without waiting for a previously requested object to be downloaded completely

  • (d) HTTP 1.1 facilitates downloading multiple webpages on the same server to be downloaded over a single TCP connection

Answer: (a), (c) and (d). One persistent connection can carry multiple objects or pages from one server. Pipelining allows another request before the previous response finishes. Option (b) fails because one TCP connection cannot span server endpoints. Test every MSQ option. Review the solved question.

Question 12: Build the RTT total in layers

Two-row RTT timeline compares non-persistent 9 RTT and persistent pipelined 6 RTT totals.

GATE 2023, MSQ.

Suppose in a web browser, you click on the www.gate-2023.in URL. The browser cache is empty. The IP address for this URL is not cached in your local host, so a DNS lookup is triggered (by the local DNS server deployed on your local host) over the 3-tier DNS hierarchy in an iterative mode. No resource records are cached anywhere across all DNS servers.

Let RTT denote the round trip time between your local host and DNS servers in the DNS hierarchy. The round trip time between the local host and the web server hosting www.gate-2023.in is also equal to RTT. The HTML file associated with the URL is small enough to have negligible transmission time and negligible rendering time by your web browser, which references 10 equally small objects on the same web server.

Which of the following statements is/are CORRECT about the minimum elapsed time between clicking on the URL and your browser fully rendering it?

  • (a) 7 RTTs, in case of non-persistent HTTP with 5 parallel TCP connections.

  • (b) 5 RTTs, in case of persistent HTTP with pipelining.

  • (c) 9 RTTs, in case of non-persistent HTTP with 5 parallel TCP connections.

  • (d) 6 RTTs, in case of persistent HTTP with pipelining.

Answer: (c) and (d). DNS costs 3 RTT. Non-persistent HTTP adds 2 RTT for HTML. Its objects need ceil(10/5) = 2 rounds at 2 RTT each, giving 3 + 2 + 4 = 9 RTT. Persistent pipelining adds 1 RTT each for handshake, HTML and all ten objects, giving 3 + 1 + 1 + 1 = 6 RTT. Do not count ten separate object RTTs. Review the solved question.

RTT timelines compare non-persistent and persistent pipelined HTTP transfers.

7. Turn wrong answers into a compact HTTP revision map

Error-log row

Revise these ideas

identity/state

Stateless HTTP and secure HTTPS

method/status

OPTIONS, 500 and 301

resource semantics

HTTP versus HTML, URL parts and cookies

performance

Resources, connections, parallel rounds and RTT layers

After 24 hours, redo only the questions attached to a weak row. If TCP connections caused the errors, revise the transport layer before another attempt. Wider Application Layer revision should mix HTTP with DNS and email so that each protocol must be selected by task.

For a structured subject route, use GATE Guidance by Sanchit Sir. After revision, move to timed practice with the GATE Test Series. The aim is simple: classify the error, repair the exact idea, then solve again without notes.