Home Assistant won't load after domain name change

I’m just using a sudo hostnamectl set-hostname (domain name) to set a Fully Qualified Domain Name (FQDN) then adjusted the /etc/hosts file for my own needs in my Raspberry Pi.

But at the next reboot, the domain name changed from the default @raspberrypi to my set domain name, yet the Home Assistant page in my set IP address won’t load anymore, what are the solutions to get through that?

Why are you doing this? Your FQDN for home assistant box should be homeassistant.local wihtout needing to change anything assuming your domain name is local.

I did a mistake perhaps, was trying to set XMPP server and following an instruction there. Still now what should I do regarding that?

Undo what you did. If you’re running hassOS you may have hosed yourself.

Just asking to make sure, I was asking the method to undo that, is using the command sudo hostnamectl set-hostname homeassistant.local enough to undo?

you can’t set the domain, only the hostname

<hostname>.<domain> i.e. homeassistant.local