There is nothing built in to XF which will prevent it loading when you switch domains.
All you need to do is update the Board URL in the ACP - but that is primarily related to email delivery.
Even without changing that, XF will still be fully functional.
A 500 error is a generic web server error, so you will need to check the server error log to determine the cause.