Strange url rewrite issue in new wordpress site

I have just setup a new Wordpress site in an AWS EC2 host with the following DNS host name:

http://ec2-34-230-30-128.compute-1.amazonaws.com/

Everything was working fine so I just went ahead and setup a friendly domain name:

wordpress.devtechperu.com

that points to the DNS host name using a CNAME (I use AWS Route 53).

However, now when I navigate to wordpress.devtechperu.com, Wordpress shows the site with http://ec2-34-230-30-128.compute-1.amazonaws.com/ in the browser URL!!

I have never run into this issue with other webservers so I guess WordPress is rewriting the url somehow?

Any help is appreciated.

Upvotes: 0

Views: 193

Answers (2)

Mithc
Mithc

Reputation: 891

WordPress, by default (if a rewrite handler like mod_rewrite in Apache is enabled), redirects to the URL that you have set as Site Address.

After changing the DNS records, you should also update the Site Address and the WordPress Address values in the dashboard by going to Settings → General. Other method is changing those values in the database, they are in the wp_options table as siteurl and home.

For further information about changing WordPress Site URL check out Changing The Site URL.

Upvotes: 1

I just changed the default address in the Wordpress Settings and this fixed the issue

Upvotes: 0

Related Questions