How do I add onion domain on my current website?
I use ubuntu and nginx. I install tor and have the domain name string (.onion). That's the easy part. Now I'm stuck. I have tried several guides but always the website breaks.
How exactly can I redirect that .onion domain to my website?
1 Reply
Hey @renos! From what I was able to dig up, it's not possible to have a .onion URL address point directly to a regular top-level domain like example.com, as .onion addresses are designed to only be accessible within the Tor network and are not registered in the global DNS system.
However, there are some techniques you can use to make it appear as if the .onion URL is pointing to a regular top-level domain like example.com, while still keeping the actual content within the Tor network. One way to do this is to use a reverse proxy server that can route requests from the .onion address to the regular top-level domain, and then serve the content back to the user via the .onion address.
Let's say you have a website running on example.com and you want to make it accessible through a .onion address. You could set up a reverse proxy server that listens for requests to the .onion address and forwards them to example.com, then sends the response back to the user via the .onion address. This way, users accessing the .onion address would see the content from example.com, but the content would still be served from within the Tor network.
There are also some services that offer this sort of reverse proxy functionality for .onion sites, such as Onionize. These services sometimes charge a fee and may have limitations on the types of sites they can proxy, so definitely check their documentation before using them.
Ultimately, if you're looking to go the self-managed route, I recommend checking out the following guides to see if they will accomplish what you're looking to create:
https://arcdetri.github.io/tor-hidden-onion-nginx.html
https://github.com/alecmuffett/eotk/blob/master/docs.d/HOW-TO-INSTALL.md
--Eric