View in alertmanager in alert mail takes to localhost:9093

in alertmails the “view in alertmanager” takes to
http://localhost:9093/#/alerts?receiver=email
how to redirect it to
http://prometheus_server_ip:9093/#/alerts?receiver=email

on clicking the source in alert mails also redirect to
http://localhost:9090/graph?
how to redirect it to http://prometheus_server_ip:9090/graph?