If you don’t want to spend approx $10 every year to get a domain name there is a free alternative available.

Freenom gives out free domain name on some least popular TLDs. These TLDs are good enough to use in home lab or for testing.

You can get free domain name on the below TLDs

.tk, .ml, .ga, .cf, .gq

By default you can get the domain name for free for upto 12 months. You can renew the domain name after 12 months for free again.

So essentially you are getting the domain for free for lifetime or up until freenom shuts down.