Redirect subdomain of one domain to another which is expired

Discussion in 'Tips/Tricks/Mods' started by lonerunner, Mar 22, 2016.

  1. lonerunner

    lonerunner New Member

    I have 2 domains and both are on my server and both are registered by me. But the problem is that one of domains expired yesterday and i need to access it's data through the url urgently but i can't renew it in next few days.

    So i can access both websites in my control panel and i can control everything about them, dns, subdomains, alias domains, etc...

    As domain2.com expired, can i somehow create subdomain or alias domain of domain2.domain1.org and when i access that subdomain to show website from expired domain2.com.

    I have tried couple of solutions with subdomains, and alias domain creation but no luck. I also tried to add a record to my DNS for domain2.domain1.org to point to domain2.com

    Is there a possible way to redirect to expired domain? if that matters and also i use nginx and BIND for dns.
     
  2. DDArt

    DDArt Member HowtoForge Supporter

    You can try the following:
    Open File c:\windows\system32\drivers\etc\hosts add something similar to..
    123.123.123.123 domain2.tld
    (Your Server IP) domain you want to show up, you can add subdomain.domain2.tld as well.
    When you are done you can remove the line or add, "#" in front of the ip/no#.
     
  3. lonerunner

    lonerunner New Member

    Why does everyone assume i need this. The problem is that i can't go to company and setup hosts file to all 5 pc's i can't even access them, so i need some other solution to access the website that have expired domain with url on my server.

    And btw i am on linux ;)
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Name based vhosts on apache and nginx can only be accessed by a domain, so you need a domain to access a site. If you cant modify the hosts file then setup a temporary subdomain of another domain and point that to this website.
     
  5. lonerunner

    lonerunner New Member

    I have complete access to the server, and i tried various combinations but couldn't make it work.

    I tried to create alias domain subdomain.domain1.com -> expireddomain.com

    I tried to create subdomain.domain1.com and map in vhosts to point to expireddomain.com

    I tried to create different dns records, even ALIAS record from subdomain to expired domain.

    I tried to create new domain with subdomain path and map it in vhosts file to go to /var/www/expireddomain.com

    In the end i even tried to create new domain with one of free domains from freeones.com and make a record and redirect to expireddomain.com

    Later i tried to create alias of domain from freeones.com to expireddomain.com and even that didn't work.

    So at the end the only solution i can think of is to create a new domain on my server with one domain from free domains i created and copy all content from expireddomain.com
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    sub and alias domains work fine, I use that regularly. If it does not work then there is either an issue with your server or your cms, a rule that you set in the website redirect tab or a .htaccess file is configured to redirect to the original domain.
     
  7. ztk.me

    ztk.me Active Member

    and if all that's failling... setup local / remote proxy and set /etc/hosts to your needs so proxy thinks domainxyz is ip a.b.c.d
    I'm sorry but there are only limited solutions - especially when you need it to deploy on 5 access restricted machines out of your admin control ... you probably just need to wait then if you can't change DNS/Resolve entries or setup proxy.
     

Share This Page