Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using an AWS EC2 micro instance to run a wordpress blog.

I've successfully mapped a subdomain to the Elastic IP for the micro instance. After a few minor changes, the URL I mapped to the Elastic IP ( opens up the wordpress home page but whenever I click on any of the wordpress links the domain changes to the AWS public DNS for that instance (

How do I fix the URLs so that they all follow the subdomain I have setup?

share|improve this question
up vote 1 down vote accepted

I used to following command to apply the host name change to the machine.

sudo /opt/bitnami/updateip --machine_hostname 

After that the URLs were fixed.

If using a Bitnami AMI, be sure to modify the updateip file in /opt/bitnami/ to something like updateip.orig. This prevents the hostname from being changed on reboot.

share|improve this answer
That might not stick after a reboot, though. EC2 automatically updates the machine's hostname, because it can change when the server is restarted. – ceejayoz May 2 '12 at 14:22

I think that there's a setting in wordpress that forces the base address of links. Or you can rewrite the servername in webserver.

share|improve this answer
Thanks, @theist. I ended up using am 'updateip' tool that was included in the install. I believe this went into the mysql database and made the necessary changes. Now the URLs look like they should (except for the '/wordpress' which I am still trying to get rid of). – bnjmn Nov 14 '11 at 16:39
sudo /opt/bitnami/updateip --machine_hostname – bnjmn Nov 14 '11 at 16:42
Offtopic: Thanks? Reward the useful answers with upvotes and select one if it's a good solution. If you have the correct solution answer your own question, this improves the site :) – theist Nov 22 '11 at 11:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.