ASPNetFAQ.com: What is ASP.NET?

Technology posts on ASP.NET, IIS, Windows (+ a little Linux), Cloud Servers, Hosting, and more!
  • Blog Home
Search the site...

WordPress: Redirect One Domain to Another

Tweet
Share
0 Shares

I have multiple domains pointed to certain WordPress installations that I run. Some people have setups like this and run multiple sites in their WP install. I, on the other hand though, wanted to redirect all requests for certain domains to a single domain. Basically consolidating the domains so the users all wind up on what I decide as the primary domain regardless of which domain they enter.

Looking for the BEST WordPress Hosting?
Read my review of the Best WordPress Hosting or click the banner below to check out SiteGround's plans - starting under $4/month!
Do you already have a site? They'll migrate it for you - FREE!

Web Hosting

I first tried to do this with Redirection but that plug-in doesn’t seem to quite handle things the way I wanted.

After some stumbling around I found a setting within WP itself that does the trick – no plug-in or anything else fancy needed.

The setting to redirect WordPress URLs

What I did was change the “WordPress Address (URL)” and “Site Address (URL)” settings (boxed in red above), which are found on the Settings->General options page, to both be the primary domain name exactly as I wanted it to be. Then, presto, it auto-redirected all traffic to that domain.

Now, let me note, when I first did this, the site broke for a little while. The reason was that WP was now “looking” for things in a new location and my local browser had some old data cached. It was fine in reality (for the rest of the world) but looked broken for me. After just about two minutes, the cached data seemed to have resolved itself and everything was fine.

So, to summarize with an example, I have both www.site1.com and www.site2.com pointing to a WordPress installation. But, if WP notices the www.site2.com domain it performs a redirect and reloads the site with the www.site1.com domain as I designated.

Nice trick. I hope this tip helps.

More from my site

  • Manually Remove the W3 Total Cache WordPress pluginManually Remove the W3 Total Cache WordPress plugin
  • Change the WordPress Domain Name After Moving a SiteChange the WordPress Domain Name After Moving a Site
  • Update Your WordPress Database Connection StringUpdate Your WordPress Database Connection String
  • What makes good web hosting?What makes good web hosting?
  • Convert a Folder to an Application on a Remote IIS HostConvert a Folder to an Application on a Remote IIS Host
Tweet
Share
0 Shares
cytanium, Hosting, Wordpress

Comments are closed.

Proverbs 19:20

"Get all the advice and instruction you can, so you will be wise the rest of your life."

A Note On WordPress Hosting

Our main focus is of course .NET, but with a mix of Linux, virtualization, and other technologies. But if you're really looking for the best WordPress hosting specifically, read my WordPress host review to save yourself hassle AND money!




Recent Posts

  • What makes good web hosting?
  • jQuery Mobile C# ASP.NET and N5 Networks Software Repository
  • Open Source Bug Tracking Software and the Orchard Project
  • ASP.NET Development with Dreamweaver MX: Visual QuickPro Guide
  • Kendo UI Sample, ASP.NET Ajax Tutorial & More

Tags

ASP.NET Automation centos CMS css cytanium Development/Coding Email gmail Hosting htaccess http https IIS javascript Learning Linux logparser MySQL nginx openssl OrcsWeb performance PowerShell redirect RHEL security server SherWeb smtp SQL/Databases ssl System Administration telnet terminal tip Troubleshooting Ubuntu virtualization Visual Studio web farm web hosting Windows windows server Wordpress

Categories

  • ASP.net development
  • Development/Coding
  • Hosting
  • IIS (Internet Information Services)
  • SQL/Databases
  • System Administration
  • Virtualization
(c) ASPNETFAQ.com