Jump to content

Redirect domains to a URL+domains


kahymo
Go to solution Solved by requinix,

Recommended Posts

hi guys

i need a script i can use on  a website that redirect all domains to a specific URL+domain

 

so here is the goal to achieve:

 

i want to redirect DOMAIN1.com  DOMAIN2.org DOMAIN3.com ....

to my main domain MyredirectDomainurl.com 

and on MyredirectDomainurl.com  i need to run a script that will FORWARD

DOMAIN1.com     ===>  https://www.afternic.com/domain/DOMAIN1.COM

DOMAIN2.ORG     ===>  https://www.afternic.com/domain/DOMAIN2.ORG

DOMAIN3.com     ===>  https://www.afternic.com/domain/DOMAIN3.com

 

thanks for your help

   Hal

 

 

 

 

Edited by kahymo
typo
Link to comment
Share on other sites

the htaccess code will be hosted on the root of MyRedirectDomain.com  as show in the illustration

 

how to catch the origin domain in a variable

and reuse it for the destination

 

the use is to forward 100 or 10K domains to one website, and have them all redirected to a specific parking page

Edited by kahymo
Link to comment
Share on other sites

@requinix is it easy to bulk redirect hundreths/thousands domain to the target domain

 

if you  redirect one by one,

it is hunndreths/thousands redirect inside these registrar backoffice who can be take anything from 1 minutes upto 3 minutes  per redirect

 

so after it is setup, it take 15min to redirect all the domains

versus a few hours/days to process each domain one by one

Edited by kahymo
Link to comment
Share on other sites

@requinix, that's an alternative solution

but require a server, which i don't have right now

 

 i think some developpers should be able to write a simple htaccess and index.php code

that do just that with one domain 

 

 

 

 

Link to comment
Share on other sites

  • Solution
30 minutes ago, kahymo said:

but require a server, which i don't have right now

What? Sure you do: that second server you were planning to use. The one where the domains redirect to, and where you were going to redirect from.

Take that, add a virtualhost for a catch-all domain (so any domain that doesn't match some other known site), then give it a redirect to go to destinationtarget.com/(requested domain). It's one configuration that handles the redirects for every single domain you throw at it - assuming you all want them to use the same pattern for the redirect.
Then you change the DNS for the domains you want to redirect from such that they resolve to that second server. Browser will look up "domain1.com" or "domain2.com" or "domain3.com", all of them resolve to that second server, browser asks the server for the webpage at that domain, server responds with a redirect to destinationtarget.com.

In fact, that "second server" can simply be whatever server hosts destinationtarget.com. I mean, this redirect business is very lightweight. It's not going to add any noticeable load to anything.

So there. You have a server that hosts destinationtarget.com. Give it a new configuration for a catch-all domain that does the redirect I said, then update the domains to point to that server. And if you decide to handle some redirected domains differently then you don't have to update DNS for anything.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.