How to create your free onion website on Tor network to set up an Anonymous Server or Website.\n----------------------------------------------------------------------------------------------\n\n### What are types of WWW (World Wide Web)?\n\nThere are three types of **WWW:**\n\n1. Surface Web.\n2. Deep Web.\n3. Dark Web.\n\n#### Surface Web:-\n\n> The Websites which are found in search engines. In which we can directly access Websites. Indexed by search engines.\n\n#### Deep Web:-\n\nThe sites which are hidden from the users and search engines. The links which are directly provided to the users who are eligible to access for example they are provided with authentication details which are to be used in the given login link, like to access Banking Records and Medical Records. It is not indexed by search engines.\n\n#### Dark Web:-\n\nThe Dark Web is a term referring to websites and networks that are heavily encrypted and “hidden” from the average internet user. There are a lot of reasons people do this, but the Dark Web has earned a connotation as a sort of immense black market, one associated with drugs, guns, hacking, and conspiracies.\n\nThat said, it’s also a haven for those who really, really like their privacy and aren’t fans of any kind of interference. It’s commonly used for those under strict governments that control free speech and employ heavy regulations.\n\n#### So, is it separate from the normal internet?\n\nMore or less, yes. The data itself still uses the same channels, but the walls of encryption put a clear divide between “normal” internet content and the Dark Web. You cannot hop onto your favorite browser and visit a Dark site any time you want, for instance. Traditional search engines like Google also tend not to index or show any Dark Web content, for a variety of reasons.\n\n#### How is the Dark Web different from the Deep Web?\n\nWhile the terms are sometimes used interchangeably, there’s an important difference: The Deep Web refers to all parts of the web that are hidden away from the average user and not indexed by the average search engine. This includes an immense amount of data, internal copies of various web pages and anything that you need an access code to reach.\n\nSo, pretty much every site online has some content that’s in the Deep Web, out of necessity. The Dark Web is only a small part of the Deep Web, with a more focused purpose.\n\n!(https://hackernoon.com/hn-images/0*TDCuupQF8FVkWeeT.png)\n\nSource from google.\n\n#### How to create your free onion website on Tor network?\n\n#### step-1:- Install Tor\n\nInstall **Tor** from [https://www.torproject.org/](https://www.torproject.org/)\n\nIt is available for Linux, Mac OS, Windows.\n\n!(https://hackernoon.com/hn-images/1*Cr_UBE_HB09l9hdMfoKsSg.png)\n\n#### Step-2:- Hosting a Server\n\nInstall XAMPP Server [https://www.apachefriends.org/download.html](https://www.apachefriends.org/download.html)\n\nNow start the Apache server and MySQL server.\n\n!(https://hackernoon.com/hn-images/1*iZJHs_0CtQSEcg-pdoQ_hA.png)\n\nOnce your web server is set up, make sure it works: open your browser and go to [http://localhost:8080/](http://localhost:8080/), where 8080 is the web server port you chose during setup (you can choose any port, 8080 is just an example). Then try putting a file in the main HTML directory, and make sure it shows up when you access the site.\n\n!(https://hackernoon.com/hn-images/1*vlJSRic14nZpfzLaWRXStQ.png)\n\n#### Step-3:- Configure your Tor service\n\nNext, you need to configure your onion service to point to your local web server.\n\n!(https://hackernoon.com/hn-images/1*70sBdLM81TlwbS9lkg3Dxw.png)\n\nFirst, open your torrc file go to the middle section and look for the line\n\n\\### This section is just for location-hidden services ###\n\nThis section of the file consists of groups of lines, each representing one onion service. Right now they are all commented out (the lines start with #), so onion services are disabled. Each group of lines consists of one HiddenServiceDir line, and one or more HiddenServicePort lines:\n\nAdd the following lines to your torrc:\n\nHiddenServiceDir /Library/Tor/var/lib/tor/hidden\\_service/ \n HiddenServicePort 80 127.0.0.1:8080\n\nYou’re going to want to change the HiddenServiceDir line, so it points to an actual directory that is readable/writeable by the user that will be running Tor. The above line should work if you’re using the OS X Tor package. On Unix, try “/home/username/hidden\\_service/” and fill in your own username in place of “username”. On Windows you might pick:\n\nHiddenServiceDir C:\\\\Users\\\\username\\\\Documents\\\\tor\\\\hidden\\_service \n\tHiddenServicePort 80 127.0.0.1:8080\n\nNote that since 0.2.6, both SocksPort and HiddenServicePort support Unix sockets. This means that you can point the HiddenServicePort to a Unix socket:\n\nHiddenServiceDir /Library/Tor/var/lib/tor/hidden\\_service/ \n HiddenServicePort 80 unix:/path/to/socket\n\nNow save the torrc and restart your tor.\n\nWhen Tor starts, it will automatically create the HiddenServiceDir that you specified (if necessary), and it will create two files there.\n\n!(https://hackernoon.com/hn-images/1*BtFyXOsDcZPUM3EtRwGS5w.png)\n\nTor will generate a new public/private key pair for your onion service. It is written into a file called “private\\_key”. Don’t share this key with others — if you do they will be able to impersonate your onion service. host name The other file Tor will create is called “host name”. This contains a short summary of your public key — it will look something like duskgytldkxiuqc6.onion. This is the public name for your service, and you can tell it to people, publish it on websites.\n\n!(https://hackernoon.com/hn-images/1*4egFWe_tjlJVQHPjyZMkPA.png)\n\nIf Tor runs as a different user than you, for example on OS X, Debian, or Red Hat, then you may need to become root to be able to view these files.\n\nTry it now: paste the contents of the host name file into your web browser. If it works, you’ll get the HTML page you set up in step two.