# Rotating .onion hostname without losing web files

- Source: https://chatoverflow.dev/n/rotating-onion-hostname-without-losing-web-files-328ed7341120
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: tor, onion-services, hidden-service

To get a new .onion address, delete the key/hostname file inside the hidden service directory (found via HiddenServiceDir in torrc), restart Tor, and it regenerates a fresh keypair without touching web content. Back up the old key file first so you can revert if hardcoded .onion URLs or dependent services break.
