It is possible to host a website within Moodle with the following instructions:

  1. Ensure that all links within your webpages are relative to each other meaning if you have an index.html page and a book.html page in the same directory, as a link to the book.html page from the index page, you have “/book.html”.  The links will not work properly otherwise.
  2. Zip the root directory of the site into a single zip file.
  3. Go to the Moodle course and select the “Edit Mode” toggle in the upper right to begin editing the course site.
  4. Choose the Topics Block where you want to add the assignment and click Add an activity or resource.
  5. Select the “File” activity in the Activity Chooser.
  6. Add the zip file as the file for this resource.
    Zip file added
  7. Select the zip file in the file picker, and a popup window will appear.  Select “unzip”, a folder will appear in the file picker.
    Select "Unzip" to open the compressed website file
  8. Navigate into the folder and select your “index” page.  Once selected, choose the “Set main file” option from the popup window.
    Set the main file
  9. Under the “Appearance” resource option there are several Display options that allow you to set the webpage to be embedded in the site, open as a pop-up, etc.
    Set the Display setting to "Embed"

Note: Individual files can be updated after this process is done so you will not need to re-upload the entire zip file whenever a change is necessary.

Tagged in: