Dustin Horne

Developing for fun...

DotNetNuke in the root on GoDaddy

The other day I was helping a friend setup a new website.  He wanted to use DNN for his content management and had settled on GoDaddy for hosting as this is where his domain was registered.  I had him setup his Windows Shared Hosting account and I set out to install DNN.  This is where the problems began.  I will show you how to get it working though. 

GoDaddy may not be the host of choice for many.  They have their fair share of problems just as any hosting provider does.  GoDaddy does have the advantage of being super cheap however, and this is a big draw for many people.  I've personally always had good luck with GoDaddy but I use their VPS solutions more than their shared hosting so setting up a new DotNetNuke site under a shared hosting plan as definitely a new experience for me.

I've setup several DNN sites in the past and didn't expect this one to be any different.  I downloaded the latest DNN 7.0.5 and used FTP to upload it to the root.  When it came time to set permissions though, there was a big snag.  DNN requires the root folder to have write access during the initial setup process because it has to write settings to the web.config file (and possibly others that I'm not aware of).  GoDaddy, however, does not allow you to modify the permissions for the root.  This was a problem as I needed the DotNetNuke install to be at the root of the site.  I was able to get it working on the site root though, and here are the steps to get DNN 7 working:

1.  Go ahead and install from the GoDaddy applications page into your site:  http://hostingconnection.godaddy.com/Application/DotNetNuke.aspx.  This will save you a fair amount of time as it will set it up for your domain, setup all of the database settings, and setup the SMTP server settings for you as well, so I would recommend this route.  At the time of writing, DNN 7.0.5 is the version offered.  The snag is that you have to enter a subdirectory.  For mine I entered "dnn" so my site would be at:  http://www.exampledomain.com/dnn. 

2.  The setup process takes a little time and creates a database for you.  Once it is complete, navigate to the new site http://www.exampledomain.com/dnn and complete the install process.  This will finish setting everything up and will go to the home page on your new site.  Close your browser.

3.  Open your favorite FTP program and FTP into the site.  I have a feeling that GoDaddy may create the folder as a virtual directory.  I had added an FTP user but for some reason got a 550 Access is Denied when trying to access the new dnn folder, even though the new account access was set to "All Folders".  So make sure you log in with the FTP with the original FTP account that was created when you setup your hosting.  Now move all of the files from the /dnn folder into the root of the website.  You may find that the Portals folder stays in the original /dnn folder.  This was the case for me as a log file couldn't get moved.  However, after moving everything else, I was able to delete the /dnn folder.

4.  In your hosting control panel, look at your databases and see what the database name was that was created.  It may look something like mydbname0023423.  This is both your database name and your username.  Click into the Web Admin Tool for the database and enter that username and the password you supplied during setup.  You should get a list of tables for your database, one of which is PortalAlias.

5.  In the Query Analyzer (in the list of links on the left, toward the bottom), run the following:  SELECT * FROM PortalAlias
You should see an entry there.  Under the column HTTPAlias it should say:  www.exampledomain.com/dnn.  This is what you want to update since you've moved the site to your root. 

6.  Now run the following SQL:  UPDATE PortalAlias SET HTTPAlias='www.exampledomain.com'
Make sure you replace 'www.exampledomain.com' with your own base domain. Once executed, this will update DNN to point to the root of your server.

7.  DNN Configuration is complete, but one more step needs to be done to make it work.  Go back into your hosting control panel and open the File Manager.  If you look at the file manager under the root, it will show that all subfolders have write access, but they actually don't.  Select all folders (not any of the files and not the [Root]) and click the permissions button.  Uncheck the "Inherit" button and check the button to reset all children to inherit from current folder.  Click OK and wait for the permissions to be updated.

That's it... now if you visit your site at the root your DNN site should come up.  Keep in mind however that nothing will be able to write to the web.config in the root so if you have modules that depend on that ability you may need to update those manually.  You'll probably also want to remove write permissions on any folders that don't actually need it.  Personally, I would avoid using GoDaddy shared hosting for any DNN installs but if it's not an option, the steps above should get you up and running.