Wordpress redirects to subdomain

Posted on 2012-08-21
Medium Priority
Last Modified: 2012-09-09

When I installed Wordpress the site domain was not yet pointing at the hosting space so in General Settings I set the Wordpress URL and Site Address URL to the preview URL provided by the host which is in the format preview.myhost.net.mydomain.com (where mydomain.com is the domain for the site).  That all worked fine.

Now that the domain IS pointing at the Wordpress site, browsing to www.mydomain.com displays the site fine but the browser address bar shows that a redirect is occurring to preview.myhost.net.mydomain.com.  

How do I stop Wordpress performing this redirect?  If I change the WordPress Address (URL) in Settings > General from http://preview.myhost.net.mydomain.com to http://www.mydomain.com then I can no longer login to admin and I have to change the value back in the database.

I've read http://codex.wordpress.org/Moving_WordPress but I'm not sure what parts are relevant since I'm not actually needing to move the location of any files.

Help appreciated!
Question by:Danzigger
1 Comment
LVL 10

Accepted Solution

Damjan earned 2000 total points
ID: 38319166

did you change both?

The "Home" setting is the address you want people to type in their browser to reach your WordPress blog.
The "Site URL" setting is the address where your WordPress core files reside.

Note: Both settings should include the http:// part and should not have a slash "/" at the end.

You can also try other methods, listed here - http://codex.wordpress.org/Changing_The_Site_URL

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses
Course of the Month14 days, 4 hours left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question