SMH Domains is a self-custodial domain name service built on top of the Polkadot blockchain (currently deployed on the Passet Hub parachain).
Domains are registered directly on-chain, and users can add or update DNS zones securely without relying on centralized registrars.
🔗 Live Demo: https://smh.elamir.ch
Try resolving .smh domains through our live DNS instance at 91.107.151.44.
Example:
dig @91.107.151.44 latinhack.smh- Every
.smhdomain is registered on the blockchain using SMH smart contracts. - Domain metadata (DNS zones) are stored and synchronized by the
smh_dns_pluginscript. - The PowerDNS authoritative server hosts
.smhzones. - A recursive PowerDNS server forwards
.smhqueries to the authoritative server, while handling normal DNS queries normally.
sudo apt update
sudo apt install pdns-server pdns-backend-sqlite3You can use SQLite, MySQL, or PostgreSQL as a backend. For simplicity, we'll use SQLite in this guide.
Edit /etc/powerdns/pdns.conf:
launch=gsqlite3
gsqlite3-database=/var/lib/powerdns/pdns.sqlite3sudo pdnsutil create-zone example.smh ns1.smh.local
sudo systemctl restart pdnsThis will handle all queries and forward .smh domains to your authoritative server.
sudo apt install pdns-recursorEdit /etc/powerdns/recursor.conf:
forward-zones=smh=91.107.151.44Restart the service:
sudo systemctl restart pdns-recursorTest it:
dig @127.0.0.1 example.smhIf everything is configured properly, you should see your .smh domain resolving via the blockchain-powered authoritative server.
The smh_dns_plugin script continuously reads .smh domain updates from the Passet Hub blockchain and updates the PowerDNS authoritative server database.
Clone the repo:
git clone https://github.com/elamirch/smh-domains.git
cd smh-domainsSet executable permissions:
chmod +x smh_dns_plugin.jsEdit your crontab:
crontab -eAdd this line to sync every 5 minutes:
*/5 * * * * /path/to/smh-domains/smh_dns_plugin.js >> /var/log/smh_sync.log 2>&1This ensures your DNS zones stay up-to-date with the latest blockchain state.
┌────────────────────────────┐
│ Polkadot / Passet Hub │
│ (SMH Registry) │
└────────────┬───────────────┘
│
▼
smh_dns_plugin (cron)
│
▼
┌────────────────────────────┐
│ PowerDNS Authoritative │
│ - Hosts .smh zones │
└────────────┬───────────────┘
│
▼
┌────────────────────────────┐
│ PowerDNS Recursor │
│ - Forwards .smh → Auth │
│ - Resolves others normally│
└────────────────────────────┘
Use the sample DNS server to test .smh domain resolution:
dig @91.107.151.44 example.smhOr via your local recursor setup:
dig @127.0.0.1 example.smhMPL 2.0 License
Contributions are welcome! Please open an issue or submit a PR if you’d like to improve SMH Domains.