The ws Parameter in Magnet Links Explained

The ws parameter in a magnet link stands for “Web Seed” and is used to provide direct HTTP or HTTPS download URLs for the referenced content. By embedding standard web server links directly into the magnet URI, BitTorrent clients can fetch data from traditional web servers in addition to, or in place of, peer-to-peer (P2P) swarms. This mechanism bridges standard web hosting with P2P networking to ensure reliable file availability and faster initial download speeds.

How the ws Parameter Works

In a standard magnet link, parameters like xt (exact topic/hash) and tr (tracker) locate peers within the BitTorrent network. When the ws parameter is added, it points directly to a web server hosting the complete file or repository.

A basic magnet link utilizing this parameter looks like this:

magnet:?xt=urn:btih:EXAMPLEHASH12345&dn=FileName.iso&ws=https://example.com/downloads/FileName.iso

When a compatible BitTorrent client opens this link, it attempts to connect to P2P peers while simultaneously establishing an HTTP/HTTPS connection to the web seed URL. The client downloads missing pieces from the web server using standard HTTP range requests and shares those pieces with other connected peers.

Key Purposes and Advantages

Specification Standard

The ws parameter implements the WebSeed specification (defined in BitTorrent Enhancement Proposal BEP 19). It allows content creators to integrate standard web infrastructure seamlessly into decentralized file sharing without requiring dedicated BitTorrent tracker servers or continuously running BitTorrent seeder nodes.