DNS Issue with primary domain & sub-domains

  • | 1145 points

    Everything was going perfect for several months. I like so many, quickly fell in love with Laragon and it became a critical development tool. Whenever I created a new site, I used the following pattern:


    Today I have dozens of sites like this. Then earlier tonight I created a local site for the primary domain as I decided it was time to give it a new look.


    I worked on it for a few hours and then went back to work on a different site and it turns out, ALL of the sub-domains are being forwarded to the primary domain. I checked several of them and ever since creating the site using the primary domain name I ran into trouble. Many of the sub-domain sites are worked on daily and they were fine earlier today.

    So to try to work backwards and I edited HOSTS file and commented out the #primarydomain, I renamed the virtual host file in sites-enabled to auto.primarydomain.localdev.conf.old, restarted Apache, restarted everything, cleared Google cache... and still, all sub domains are being forwarded to primarydomain.localdev.

    Before it was a 404 page missing error when I landed at the primary domain, now it's different errors due to changes above.

    What did I miss?

  • administrators
    | 131225 points

    @billiemead : How about deleting all former auto virtual hosts?
    Menu > Apache > sites-enabled > Delete all auto...?

  • | 1145 points

    Thank you so much for the quick reply.

    I did that, confirmed the directory was empty. Restarted Chrome, restarted all services and went to https://sitename.primarydomain.localdev and was immediately forwarded to the primary domain!

    I did noticed all the the auto virtual host files are back, must be auto-created anew?

    I also noticed that the entry in the HOSTS file is back!! primarydomain.localdev #laragon magic!

    How do I completely delete this site from Laragon, all traces? Maybe that will get me at least back to where I was!! :)

  • | 1145 points

    Just checked Chrome, Firefox and Opera.. all doing the same. I never went to some of the domains using Opera but they forwarded just the same so it's definitely not a caching issue. Just wanted to rule that out...

  • | 1145 points

    Next, I made a copy of HOSTS file, deleted everything and only left one entry: sitename.primarydomain.localdev #laragon magic!

    Unbelievably, it forwarded to primarydomain.localdev (which now just gives a browsing error)

    scratches head

Log in to reply

Looks like your connection to Laragon was lost, please wait while we try to reconnect.