how to redirect thousands of domains?

Discussion in 'Apache' started by cgo85, Oct 22, 2008.

  1. #1
    If I have about 10,000 domains currently unused how could I easily redirect these to ONE website?

    I now I can manually do 301 redirect with each one, but is there a way to do this MUCH faster?
     
    cgo85, Oct 22, 2008 IP
  2. Jdguy

    Jdguy Peon

    Messages:
    30
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Write a script to do it. I would assume you have a list of the sites, so it would be fairly easy to do.

    Where are they hosted at?
     
    Jdguy, Oct 22, 2008 IP
  3. cgo85

    cgo85 Peon

    Messages:
    380
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Unsure... I think this person is will be hosting on their own server.

    We'd have a list of the sites.

    Do you have any advice on where I could find a tutorial or info on how to do this?
     
    cgo85, Oct 22, 2008 IP
  4. Jdguy

    Jdguy Peon

    Messages:
    30
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It could be done in a lot of different programming languages, especially if you are using your own server. For the most part it involves pretty basic file input and output actions.

    It will depend on the type of server/host, what type of language you will be able to use and whether you will be able to run the program on the server or not.

    Most entry level programming books would probably provide enough information to do this, but you could also probably hire someone to do it for pretty cheap.

    You definitely don't want to do it by hand though :)

    If you find out more about the type of server it is/your hosts rules, let me know and I will give you a price on doing it.
     
    Jdguy, Oct 22, 2008 IP
  5. Ladadadada

    Ladadadada Peon

    Messages:
    382
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Have you assigned the IP addresses for each of these domains yet ?

    The easiest way would be to assign all of them the same IP address which is the IP address of a web server that you have control of.

    Then, on that server, create a single instruction in Apache that redirects to the website you desire. No matter what they request or from what domain, if it hits that server it will get a redirect to the one website you want.

    This instruction would be a rewrite rule like this:
    RewriteRule . http://www.yourwebsite.com [R=301,L]
    Code (markup):
     
    Ladadadada, Oct 27, 2008 IP
  6. maestria

    maestria Well-Known Member

    Messages:
    705
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    110
    #6
    If all the domains are resolving towards the same ip, then open the httpd.conf and then place the name virtual host of the domain to which redirection is to be done.
    And then remove all the other virtual host entries for all other 1000 domains and all these will be redirected towards the first name virtual host.
     
    maestria, Oct 28, 2008 IP
  7. vovaNux

    vovaNux Peon

    Messages:
    47
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Are these domains settled under a single account? If yes, you will be able to redirect them using a short .htaccess file
     
    vovaNux, Nov 12, 2008 IP