Blocking a domain from being used, reserve for personal use

So when you attempt to access the wordpress website with a domain that is not registered within the wordpress multisite domain mapping feature already, it sends you to "http://websitename.com/wp-signup.php?new=XXXXXXX" to register it.

How would I make wordpress not do anything but let whatever the server itself lets happen when a domain that points to the server accesses it?

I need to do this because I have a domain I am adding to my cpanel account called "abc.my-wordpress-multisite-domain.com", it will however not use the base "/public_html" folder, it will use "/public_html/abc". When I access abc.my-wordpress-multisite-domain.com, I get redirected to "http://my-wordpress-multisite-domain.com/wp-signup.php?new=abc" instead of having the contents of "/public_html/abc" displayed.

Thanks in advance.

  • Jack Kitterhing

    Hi there @Chippy,

    Hope you're well today and thanks for your question.

    WordPress does this, if user registration is enabled, but no site at the visited sub domain or sub directory is found, so the end user can then register that site.

    To stop this from happening add the following to your wp-config.php

    define( 'NOBLOGREDIRECT', 'http://yourdomain.com/' );

    That will then redirect to yourdomain.com when ever a sub directory or sub domain is visited that doesn't exist. :slight_smile:

    Thank you!

    Kind regards
    Jack.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.