DotNetNuke Tip Modifying your Portal Aliases

Published Tuesday, July 03, 2007 1:04 PM

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!

Comments

# Patrick Farrell said on Friday, July 06, 2007 3:47 PM

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.

# Sanjeev C said on Monday, July 09, 2007 8:04 AM

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

It Works

thnx

# eapen said on Saturday, September 22, 2007 8:41 PM

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

# GolDen said on Monday, March 17, 2008 3:09 AM

Thanks a lot for this helpful tip!

# lame jack said on Friday, March 28, 2008 1:27 PM

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

# cs6505 said on Monday, March 31, 2008 2:18 PM

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

# ak said on Saturday, April 19, 2008 12:39 AM

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

# ak said on Saturday, April 19, 2008 8:23 AM

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:

www.mydomain.com/Default.aspx

why??

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

# Chris Hammond said on Monday, April 21, 2008 3:21 PM

AK-

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

# Bash said on Monday, April 28, 2008 3:52 PM

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?

# hitesh said on Tuesday, July 08, 2008 6:04 AM

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 !!

# Kevin said on Saturday, July 26, 2008 12:29 PM

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

# Kevin said on Sunday, July 27, 2008 8:41 AM

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

# Marco said on Wednesday, August 27, 2008 12:10 PM

perfect! thanks!

# John said on Friday, September 12, 2008 11:46 PM

This tip does work. I make the change in my DB and the site URL comes up as it should. However, I find that when I change the alias through my DB to the new one, I can no longer access the Admin functions from my control panel once logged into DNN. I upgraded to DNN 4.09 and the upgrade screen also did not appear unless the original, incorrect URL was in the MSSQL DB.

In short:

Old URL in MSSQL DB = Admin tools in DNN control panel, upgrade screen, wrong URL displayed

New URL in MSSQL DB = No admin tools, no upgrade screen, correct URL displayed

Any suggestions? I'm wondering if there is a second location that must be updated with the new Portal alias for all the site functions to work properly.

# SystemsBarbie said on Wednesday, January 06, 2010 5:56 AM

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

# Chris Hammond said on Thursday, January 07, 2010 1:25 AM

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.

# Dennis said on Wednesday, July 21, 2010 12:45 AM

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

# Sabrina said on Thursday, August 05, 2010 5:22 AM

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

This Blog

Syndication