Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Redirect Multiple Domains
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Redirect Multiple Domains

I have my primary domain mydomain.com. mydomain.com is hosted on a cPanel server (no root access)

I have several other domains which I need to redirect to a sub-folder within mydomain.com
eg.
newdomain1.com --> mydomain.com/newdomain1
newdomain2.com --> mydomain.com/newdomain2
newdomain3.com --> mydomain.com/newdomain3
newdomain4.com --> mydomain.com/newdomain4

Question:
a. Do I need to "host" newdomainX.com on a separate web-server? I mean a separate cpanel account?
b. Can I use the addon-domain/ parked domain feature of cPanel and add each domains to mydomains.com?
c. I have a spare VPS. Can I / should i setup a web-server to host all these domains and setup redirection? Any pointers to add multiple domains together effectively?

I have around 100+ domains which I need to redirect. Any suggestions welcome.

Comments

  • doghouchdoghouch Member
    edited September 2015

    Well, it depends. If you want to redirect all domains (newdomainX.com), you can use your spare VPS to perform redirects with NGINX. For example (EDIT: I can't seem to remove the domain extension from the redirect):

    server {
      server_name localhost
      return 301 http://mydomain.com/$http_host;
    }
    

    You could also use the addon feature which includes a redirect function, but you wouldn't be able to do a wildcard for all the domains unlike my code above.

  • trewqtrewq Administrator, Patron Provider
    edited September 2015

    Ask your provider about addon domains or just send them what you have above. They will tell you your options, it's easy to do in cPanel.

  • Thanks. Will contact my provider

  • using the addon domain option in cpanel should be good for a redirection like this. Just got to make sure your provider has made addon domains available to you

  • Yes, add-on domains are available to me. Can someone help write a small script to automate it? I dont want to go in and add domains one at a time.. I am looking at around 100+ domains.

    Thanks.

Sign In or Register to comment.