What Is NNTP (Network News Transfer Protocol)?

April 11, 2024

The Network News Transfer Protocol (NNTP) is used for the distribution, inquiry, retrieval, and posting of news articles using a reliable stream-based mechanism, usually TCP/IP. It facilitates the exchange of news messages and articles between servers and between clients and servers in a network.

What Is Network News Transfer Protocol (NNTP)?

NNTP is an application layer protocol that enables the efficient distribution, inquiry, and retrieval of news articles from various news databases and forums across the Internet and Usenet. Designed to be used over TCP/IP networks, NNTP supports client-server and server-server operations, making it highly scalable and flexible for news distribution.

Short History of NNTP

NNTP was developed in the 1980s to improve the UUCP (UNIX-to-Unix Copy Protocol) for distributing news articles over the Usenet network, a global discussion system. The first specification, RFC 977, was published in 1986, outlining NNTP's initial framework and operation. Over the years, NNTP has undergone revisions and updates to improve performance, security, and capabilities, with notable updates including RFC 3977, which standardized the protocol in 2006.

NNTP (Network News Transfer Protocol) continues to hold a niche but significant place in the digital communication landscape, particularly for Usenet newsgroups. Despite the rise of more modern forms of digital communication such as social media platforms, forums, and messaging apps, NNTP and Usenet serve a dedicated user base with specific interests and needs.

How Does NNTP Work?

NNTP operates on a client-server model where a client requests news articles from web servers hosting and distributing newsgroups. Each newsgroup focuses on a specific topic, and the articles within them are distributed as messages. When a user subscribes to a newsgroup, the NNTP client retrieves the list of available articles from the server. Users can then select articles to read, post new articles, or respond to existing ones. NNTP servers can also communicate with each other to propagate newsgroup articles across the Internet, ensuring that articles are widely distributed and available.

Where Is NNTP Used?

NNTP is primarily used in the Usenet system, a collection of newsgroups covering a wide range of topics. It is used for distributing news articles, participating in discussions, and sharing information across different domains. Although overshadowed by social media platforms in the past decades, Usenet and NNTP remain popular for specific applications, including software distribution, technical discussions, and academic communication.

NNTP Commands and Status Codes

Here are two tables that outline the NNTP protocol's capabilities and the server responses one might encounter while interacting with an NNTP server.

NNTP Commands Table

NNTP commands are instructions sent from a client to an NNTP server to perform specific actions, such as posting articles or retrieving them.

CommandDescription
ARTICLERetrieves a specific article using an article number or message ID.
BODYRetrieves the body of a specific article.
HEADRetrieves the header of a specific article.
STATChecks the existence of a specific article without downloading it.
GROUPSelects a newsgroup and returns information about the group.
LISTLists available newsgroups, active newsgroups, or information about them.
NEWGROUPSLists newsgroups created after a specified date and time.
POSTPosts an article to a newsgroup.
QUITTerminates the session with the NNTP server.
IHAVEInforms the server about an article a client has that the server might not.
HELPReturns help text from the server.
LASTMoves the current article pointer to the previous article in the group.
NEXTMoves the current article pointer to the next article in the group.
LISTGROUPLists the articles available in a specified newsgroup.
MODE READERSwitches the server to reader mode, necessary for some servers.
XOVERRetrieves a range of article headers in a compact format.
XHDRRetrieves specific header information from a range of articles.

NNTP Status Codes Table

Service servers use Status codes to indicate the outcome of a client's command, providing feedback on the operation's success or detailing errors encountered.

Status CodeMeaning
100Help text follows (informational response).
200Service available, posting allowed (greeting message).
201Service available, no posting allowed (greeting message).
211Group selected; information follows.
215Information follows (in response to LIST, NEWGROUPS, etc.).
220Article follows (in response to ARTICLE, HEAD, BODY, or STAT).
221Header follows (in response to XHDR).
222Body follows (in response to BODY command).
223Article exists (in response to STAT).
230New articles follow (in response to NEWNEWS).
231New newsgroups follow (in response to NEWGROUPS).
281Authentication accepted.
400Service temporarily unavailable (server may shut down).
411No such newsgroup (cannot select group).
412No newsgroup selected (need to select one first).
420No current article selected (for NEXT, LAST commands).
421No next article (in this group).
430No such article found.
440Posting not allowed (in response to POST).
441Posting failed (article not posted).
480Authentication required for command.
500Command not recognized or syntax error.
502Service permanently unavailable or no permission.

Nikola
Kostic
Nikola is a seasoned writer with a passion for all things high-tech. After earning a degree in journalism and political science, he worked in the telecommunication and online banking industries. Currently writing for phoenixNAP, he specializes in breaking down complex issues about the digital economy, E-commerce, and information technology.