Domain Alias Redirects with Multisite

My primary domain and brand is missing a letter, similar to flickr.com (as an example). So I also purchased flicker.com incase anyone spells it the way it sounds.

What I would like to achieve is that any request to *.flicker.com is 301 redirected to *.flickr.com. For example, if I request site1.flicker.com, I would be redirected to site1.flickr.com. Preferably, even if the site doesn't exist (but that isn't a must, if it only works for existing sites that would be perfect).

I am guessing my only option for this is going to be .htaccess, but I am looking for other options that might exist as well.

I have created the appropriate DNS records to send all of the traffic for *.flicker.com to the same IP as *.flickr.com. I added the domain as a secondary domain with my host, but when I use the flicker.com domain, I get sent to the new site page telling me registrations are close.

Thank you!

  • Tyler Postle

    Hey Joshua,

    Hope you're doing well today!

    First solution that came to my mind here was using .htaccess, this code here would do it:

    Options +FollowSymLinks -MultiViews
    # Turn mod_rewrite on
    RewriteEngine On
    RewriteBase /
    
    RewriteCond %{HTTP_HOST} ^(.+?)\.domain\.com$ [NC]
    RewriteRule ^ http://%1.new-domain.com%{REQUEST_URI} [R=301,L]

    I know you mentioned other than that, but just wanted to post that here in-case others land on it or you decide to go that route.

    Will need to change the domain name of course.

    As for the solution you are trying now, landing on the registration page is normal if it's directed to the IP address, if you enter the IP address into your address bar directly it will likely land on the registration page too. You could ask your web host on this one as they will have more knowledge on the hosting setup and might be able to get this sorted for you on their end :slight_smile:

    If not, let us know if there is anything we can assist with further!

    Look forward to hearing back Joshua!

    All the best,
    Tyler

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.