An ad server is software that stores data about advertising content and delivers ads to websites and applications. Ad servers are available as hosted services or as self-hosted products.
Ad servers are special-purpose web servers; like other web servers, they use HTTP (Hypertext Transfer Protocol) to serve the related files in response to user requests, which are forwarded by their computers' HTTP clients. When a user requests a web page by typing a URL (uniform resource locator) or site name into their browser’s address bar, the browser creates a connection to the site publisher's content server. When the content server returns the code for the page, at least one line includes the option to display an ad, along with the URL for retrieval of the specific ad content.
In addition to delivering advertising content, ad servers perform a variety of other tasks. Depending on the specific product or service, an ad server may also track ad views and clicks and target ads based on pre-defined criteria. Some also monitor for indications of click fraud and other types of ad fraud to ensure that the advertiser's content is actually being viewed by the appropriate audience.
In programmatic advertising, the selection and purchase of an ad impression and targeting of a specific user or group of users takes place while the requested page is loading, through a process known as real-time bidding (RTB).
Watch an introductory video about how ad servers work: