Sometimes When People Visit My Website Homepage, They Get An Error Related To Registration

Backup all files before experimenting with any solutions!

We just ran in to this problem and we finally narrowed the issue down with the help of Happiness Engineer Karen Arnold.  I wanted to keep the title broad in case someone hadn’t narrowed the issue down yet.  But, it seems after researching the problem, I’m guessing most likely your problem started AFTER you made your site into a WordPress Multisite.

Here’s your test:

  1. Clear your cache in your browser (so it doesn’t autofill your URL as you type it in).
  2. Enter your URL in the format mywebsite.com in your browser bar (without the “www”).  Does it bring up that Registration error?
  3. If it does, the good news is I think I can tell you what the problem is.
  4. If it doesn’t, this article probably won’t help you.

Here is the issue:  When creating a WordPress Multisite, you should install into the root URL, mwebsite.com, but many sites kind of drive you to installing to the http://www.mywebsite.com location (which is what we did).

So, what happens is if people enter your full web address, http://www.mywebsite.com, they get there just fine.  If they leave off the “www,” they see the error page and you get an email complaint.

Once we understood it was a Multisite problem related to the URL address, we searched on the web and found several helpful web threads that helped us grasp the situation.

It appears to be  tied to whether your site has registration disabled or enabled, but it’s actually just an end-result, not a cause.  We didn’t have registration enabled (located inyour settings on your dashboard).  The error came up either way.

SOLUTION 1
One, which seems to fix the problem for many people, suggests adding this line to your wp-config.php file:

define( ‘NOBLOGREDIRECT’, ‘www.yourwebsite.com’ )

(Replace “yourwebsite.com” with your URL).  Generally, you would find the file by going to your host, logging in and locating the file in your file manager.  Download a copy.  Then, use the host editor to edit the file if that’s an option.   Paste in the line where you see other lines that start with “define.”  Save the file, then reload the problem page and confirm it is actually going to the problem page (not auto correcting to the www version).  I think I’ll write a separate post on this process eventually because I don’t know of any sites that explain that.

As I understand it, since the website was installed in the wrong place, when someone types in the URL without the www, the website can’t find what it needs and creates that Registration error.

Here’s a thread on it:
http://jasoncosper.com/noblogredirect/

Unfortunately, that didn’t fix the problem for us, but it seemed to help a lot of people.

SO, then I found this thread:

SOLUTION 2

http://wordpress.org/support/topic/accessing-my-primary-url-without-the-www-redirects-to-signupphp

This person added the following code to the theme, functions.php file :

function ms_block_wp_signup() {

if( strpos( $_SERVER[‘SCRIPT_NAME’], ‘wp-signup.php’ ) !== false ) {

wp_redirect( get_option(‘siteurl’) );

die;

}

}

add_action(‘wp’, ‘ms_block_wp_signup’, 99);

This is out of my league in being able to follow it, but my best guess is that it blocks the site from trying to go to the sign-up page when it encounters the error.  This did not work for us, but some people had success and so I thought I would post it.

I then tried to go to the host and have them simply forward mysite.com to http://www.mysite.com.  I thought that was clever and simple, but unfortunately, http://www.mysite.com is in essence forwarding to mysite.com, so the additional forwarding creates a loop.

SOLUTION 3

After finally understanding the root of the issue, it seemed everything else was just a band aid solution and that what we needed to do was to move the site to the correct location.  I asked the host if they could do this for us, but they said it was a paid service solution at $75.  I hinted that it was just a simple copy/paste of folders, but the operator had concerns about the integrity of the databases, which I had heard before.  I figured we could handle the migration ourselves at that point.  I mentioned the operator’s reluctance to copy/paste folders to Our Happiness Engineer friend and she asked if the host knew if the site was a multisite.  I think she did.  Anyway, now we need to move our files from being physically located at http://www.mysite.com to mysite.com and I’m very confident that will solve our issue.  We decided to wait to do it after we could set aside a block of time.  I will update once we do that.  Here’s our plan:

  1. Backup the existing site.
  2. Export archive of the existing site.
  3. Try copying the files to mysite.com from http://www.mysite.com
  4. If that fails, delete files, install WordPress to the mysite.com location and import the contents.
  5. Test both http://www.mywebsite.com and mywebsite.com.

I will report back, wish us luck!

 

Leave a comment