So I have two urls.

www.url.com and www.urlb.com

I don't want to manually transfer the files to the other website, instead I just want to change the domain, so that it says www.urlb.com in the URL field.

Is this possible? Is it considered duplicate content?


This can be done through the settings section,

are you just wanting to change how a user sees the page?

if so then its very simple

Settings >> General, in there you can change how things appear, to do something more drastic, you need to login to your DB and change URLS from the options table, granted the options table is similar in nature to what is displayed on the general page...


Domain DNS

First ensure the second domain (www.urlb.com) has a DNS A record similar to the first domain (www.url.com). This can be verified with the following commands.

nslookup -q=a www.url.com

nslookup -q=a www.urlb.com

They should both output the same IP address.

Next ensure the second domain is "parked" on the first domain. If your hosting provider uses CPanel you will find an option named Parked Domains.

Edit wp-config.php

Edit the wp-config.php file and add the following lines before the line that says Happy Blogging.

define('WP_SITEURL', 'http://www.urlb.com');
define('WP_HOME', 'http://www.urlb.com');

Replace static links

There may be links in articles which point to the previous domain. So use a plugin like Search and Replace to change those.

Check for broken links

After everything is done use a tool like Linkchecker and check for broken links.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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