Knowledge Essentials - 3Essentials Hosting

DNN and $sitepreview incompatibility

Article ID: 498

 Back to Search

Symptom:
You have an existing domain, www.mydomain.com for example, at another hosting provider, and you are moving it to 3Essentials.  You're setting this up as a DNN site with us, and you want to know if you can access the DNN site on our servers BEFORE you cut over DNS to point your domain to our servers, for example, using our sitepreview link (provided in your welcome email and your control panel)
Resolution:
Before I can answer that question completely, I need to explain a little:

DNN can host multiple websites within a single DNN installation... it calls these "portals"... and it works kinda like this:

mydomain.com  ======> your DNN installation ====>portal1
myotherdomain.com ==> your DNN installation ====>portal2

So, in this example, 1 DNN installation hosts 2 different websites... to the outside world, they look like different websites, but they both are serviced by 1 DNN installation, which tracks the different settings and content for each as a different "portal" within the DNN installation.   Side note, you could also set up each domain with it's own DNN installation, but for my discussion here, I use 2 portals on 1 DNN instance, because it conveys why DNN uses the domain name in the URL the way it does... to map the URL to the right portal... it does this whether there is 1 portal, or 15 within the DNN instance.

Now, it does this by looking at the domain name when the request gets to the server/DNN installation. For instance, there i
s a entry in your DNN installation's database that literally says:

mydomain = portal1

So, it's expecting when you connect to it, that you will use the domain name "mydomain.com" in the address, and DNN will know to server you the content from "portal1".

Here's the problem... if your domain still points to your other hosting provider., you can't use that name to access the site on our servers. Now, you've probably seen our  "sitepreview URL", in your Welcome Email or in your control panel... and it is designed to allow you to access your site on our servers BEFORE you cut over your domain to point to us... however the sitepreview function uses a proprietary ISAPI filter which looks for the "$sitepreview" string in the URL, and causes the request to be handled a certain way, which conflicts with DNN's usage of the domain name in the URL. 

As a result if this incompatibility, if you have DNN installed in your website root, and you use the sitepreview link, you will likely be able to see the DNN install , HOWEVER you will find that the LOGIN link (to get logged in to DNN as the admin or host user) does not function properly... this is where the incompatibility starts causing function problems. 

So... your question might be, "so are you saying I can't access the DNN portal on your server until I cut over mydomain.com name to point to your servers?"  No, I'm just saying you can't use the handy sitepreview feature... there is another workaround, it just takes a couple more steps.

In short, you have to modify your PC's HOSTS file entry to point your domain name to our server:
  • If you're familiar with editing your HOSTS file, then simply submit a support request asking what HOSTS file entry you should use for this, and the team will let you know. 
  • If you're NOT familiar with your HOSTS file entry, here's a quick explanation:
    • On your PC is a file called the HOSTS file. It is a text file which your system will use to resolve hostnames (domain names) to server IP addresses. Normally, if you typed http://drcraigrose.com in your browser, your PC would connect to your ISP's DNS server and lookup the IP address for where it is hosted... currently, it would get the IP of your other hosting provider. But we can put an entry in your HOSTS file, which will override this... your PC checks the HOSTS file first, and if the domain name is found there, it looks for the site there.  So this enables us to have YOUR PC be able to find mydomain.com on our server, but the rest of the internet would find it at your current hosting provider. Once your PC can find it on our server, then the DNN can properly function.
To get the right HOSTS file entry, please submit a technical support request, and ask for the correct HOSTS file entry you should use for accessing your site before DNS cutover.

The following KnowledgeBase article tells you where you can find the HOSTS file on your system (assuming you're using Windows):
Once you get the HOSTS file entry in, you should then be able to open your browser, and go to mydomain.com and instead of seeing your site on your previous host, you'll hit the site on our servers.

RELATED ARTICLES:
 
Downloads Associated With This Article
No downloads are currently associated with this article.