DotNetNuke Tip Modifying your Portal Aliases

Welcome back to the DotNetNuke tips! I started doing this over a year ago, though with getting married last fall and working on my Datsun 240Z lately I haven't blogged near as much lately about DNN topics. So here we go, starting up again with my DotNetNuke Tips.

Today's tip follows:

When you're doing testing locally with a backup for a Production Database and Website one of the things you need to be sure to do is change your Portal Alias for your local URL, instead of your production URL. If you don't do this you'll hit the local URL and it will most likely redirect you to the production URL. This can cause a bit of chaos if you don't notice that you're no longer on the local/testing URL and start modifying the production web site.

To change your portal alias you can do the following.

Open your SQL Server management tool; SQL Enterprise Manager, SQL Server Management Studio, or whatever you choose to use.

Browse to your local/test database, open up the PortalAlias table. You can either Modify your existing Alias, or you can add a new Alias to this table. test.myurl.com for example, be sure to setup the proper portal ID if you're adding a new alias and you have a lot of different aliases in there. You might also need to setup the aliases for the child portals as well if you plan on using those.

The next step is crucial. You'll want to reset your website before you try to hit the new alias. You can do that in a couple of ways, I always prefer to open up the web.config file, add a carriage return and hit save. This will cause IIS to reload the site, clearing out the cache and loading the new portal aliases.

Look for more DotNetNuke tips coming soon!

18 Comments

  • Awesome. Thanks for the tip. I found the database deal, but the web.config change was needed. I was loading my portal via virtual directory and had found the proper table holding the alias key, but never could figure out an easy way to clear the cache.

    thanks for the great tip.

  • yea we can alter http Alias column of portal alias table to live site url.
    It Works
    thnx

  • thanks, i was going crazy trying to figure out why the db change didnt fix it.

  • Thanks a lot for this helpful tip!

  • thanks, excellent tip. You made my day. Instead of modifying the web.config file, you can simply kill the ASP WP!!

  • Thanks for the tip. This one saved the day for me.

  • hi,
    my website url is: www.iau-tnb.ac.ir,
    i changed the httpalias to "www.iau-tnb.ac.ir"
    but the website went to a loop back;
    what is the problem?

    thanks alot

  • i build a website using dnn 4.6.2 & publish it through LAN netmork. now i want to put it in my domain, but i recieve this msg error:

    http://www.mydomain.com/Default.aspx?tabid=54&error=Object+reference+not+set+to+an+instance+of+an+object.&content=0
    why??

    plz help soon, i am in very very dangerous position!!!

  • AK-
    Once you change the PortalAlias table in DNN you must reset your website for the cache to be reloaded.

  • I know this is not exactly the same but it is related. would you be able to tell me how to make www.mydmain.com/dnn/ become www.mydmain.com so that users dont see the /dnn folder in the url?

  • hi,

    i have some Problem with Portal Alias.

    my problem is like that, My Site Online URL is Working Properly. but when ever i set "localhost/xyz" at HTTPAlias. so it Gives me Error of The page cannot be displayed.

    Please Help me !!

  • I need help. My web domain is www.sarasotamarathon.com when I type that it, DNN redirects the page to the ip address instead of www.sarasotamarathon.com/srq

    How do I change this? I put a new alias in the host setting in DNN - what do I do next?

    Your help is really appreciated.

    Kevin

  • All,

    If I build a site on a test server - then I want to go live with it on another server, what do I need to backup and transfer over in order that I can just copy everything to the new server?

    I tried backing up the portals folder - and then copying it over to the new server but that doesn't seem to work. Any help is appreciated.

    Kevin

    I can be contacted directly at kevbrisarasota@aol.com

  • perfect! thanks!

  • Hello

    We want to remove the /dotnetnuke/ from all 300 pages of our website that has been running since Feb 09.

    Google isn't indexing all of our pages just 98. I'm thinking that the /dotnetnuke/ is causing our content to be too deep in our site for Google to find(?)

    We also don't have any Page Rank although our site appears on page one for most search queries. Obviously we don't want to lose our position in Google.

    Would you advise that we do remove the /dotnetnuke/ in our urls and if so should we create a new site and use 301 redirects or is there a way of removing the /dotnetnuke/ from our existing urls but still keeping our Google history?

    Many thanks

  • I would recommend removing it, if you have access to IIS you can use IIS to do the 301 redirects by pointing the virtual directory to the new website using the 301 redirects.

  • Hi "ak",

    Your issue is that, you have given the "default.aspx" in the portalalias table, and you have setup your project to load "default.aspx" as the start page (for eg in visual studio).
    Just now i had same issue and its sorted for me.

    NB: I am sure that its an old post, but as i found, i thought of sharing it.

    Dennis

  • I have an already developed site in dnn which is live. I am trying to set up the same at my development environment. I have added localhost/sitename to the portal alias table.
    When i am trying to navigate to any link within the site ex: sitename.forgotpassword its working but if the URL doesnt contain "sitename" word in it , its not navigating to the same. I am getting "page not found" error.

    Please help me with this. I have really gone crazy trying all the options.
    Thanks

Comments have been disabled for this content.