Temporarily disable a DNN Portal


Users may want to temporarily hide or shut down a portal for maintenance work but there is no option in the DNN UI that can accomplish this. This article provides a guide to hiding the portal through the backend.



  1. First, you must log in to the SuperUser account
  2. Then, go to Settings > SQL Console
  3. Run the following query and make note of the PortalID: SELECT * FROM PortalAlias
  4. Next, run the below query to update the Expiry Date for the Portal that needs to be disabled
    UPDATE Portals
    SET    ExpiryDate = 'MM.DD.YYYY'
    WHERE  PortalID = #
  5. If you would like to re-enable the portal again, you need to update the expiry date with any date in the future that was set above by:
    UPDATE Portals
    SET ExpiryDate = ''
    WHERE PortalID = #

Note: For SQL queries executed directly in the Database or on the SQL console, you need to Clear Cache for this to work: Settings > Servers > Clear Cache



To test that the query has run successfully and the Portal is disabled:

  • Access the Portal URL and you should get an expiration message. 


You can change the expired message to a customized message by accessing the file path DNNRootFolder/App_GlobalResources/SharedResources.resx and modifying the ContractExpired.Error text.



Please sign in to leave a comment.