How to host your own website

A website host can be set up on your personal computer. This can be done on either a Windows or Mac supported computer or laptop by using a server called MAMP. First a few steps should be undertaken to ensure that your laptop is ready to host a website.

The below steps can be followed to host a website:

Setting up hosting on Windows

  1. Double-click the MAMP setup icon. It looks like a white elephant on a grey background.

  2. Click Yes when prompted. This will open the MAMP installer.

  3. Complete the setup process. To do so:

  • Select a language and click OK

  • Click Next

  • Uncheck the “MAMP PRO” box and click Next

  • Check “I accept” and click Next

  • Click Next three times, then click Install

  1. Go to your website’s source code document. While MAMP is installing, find the document on your computer that you pasted the website’s source code into earlier. To do so:

  • Open Start Image titled Windowsstart.png

  • Open File Explorer Image titled Windowsstartexplorer.png

  • Click the document’s folder in File Explorer’s left-hand sidebar.

  • Select the document by clicking it.

  1. Copy the source code document. Press Ctrl and C at the same time to copy the selected source code document.

  2. Double-click the MAMP icon. It resembles a white elephant on a grey background.

  3. Click OK when prompted. You’ll see a warning about port 80 appear; clicking OK on the warning window dismisses it.

  4. Click Preferences…. The gear-shaped icon is on the left side of the MAMP window. Doing so opens the Preferences window.

  5. Click the Ports tab. It’s at the top of the Preferences window.

  6. Click Set MAMP ports to default. This button is in the middle of the page. Doing so will reset the ports that MAMP uses, which will resolve the port 80 error.

  7. Click the Web Server tab. It’s at the top of the Preferences window.

  8. Click Open. This button is near the bottom of the window.

  9. Paste the source code document into the folder. Press Ctrl and V at the same time. The source code document will appear in the MAMP root folder.

  10. Click OK on the MAMP window. This will save your settings.

  1. Close and re-open MAMP. Click Quit in the bottom-left corner of the MAMP window, then double-click the MAMP icon to re-open MAMP.

  2. Click Start Servers. It’s on the right side of the MAMP window. Doing so will start the MAMP server with your website’s source code and port preferences. Your website should now be live; people will be able to access it by entering your public IP address into a search engine.

Setting up Hosting on Mac

  1. Double-click the MAMP setup file. It resembles a brown box.

  2. Complete the MAMP installation process. To do so:

  • Click Continue on each of the first three pages.

  • Click Agree

  • Click Install for all users of this computer, then click Continue

  • Click Install

  • Enter your Mac’s username and password, then click Install Software

  1. Wait for MAMP to finish installing. This process will likely take around five minutes.

  2. Open Finder. Click the blue, face-shaped app in your Mac’s Dock.

  3. Go to your website’s source code document. Click the folder in which the source code document that you copied or created earlier is located.

  4. Copy the document. Click the document to select it, then click Edit and click Copy.

  5. Click Applications. This folder is on the far-left side of the Finder window.

  6. Double-click the MAMP folder. It’s in the middle of the Applications folder.

  7. Double-click the htdocs folder. You’ll find this folder in the middle of the MAMP folder. This folder is where your website’s resources, including the source code document, go.

  8. Paste the source code document into this folder. Click Edit, then click Paste Item.

  9. Open MAMP. Click the MAMP icon, which resembles a white elephant on a grey background. You may have to type MAMP into Spotlight Image titled Macspotlight.png to find MAMP.

  10. Click Preferences…. This gear-shaped icon is on the far-left side of the MAMP window.

  11. Click the Ports tab. It’s at the top of the Preferences window.

  12. Click the Set to default button. You’ll find this in the middle of the Ports tab. Doing so resets the ports that MAMP uses, which will prevent your website from being blocked by your router’s default firewall.

  13. Click OK. It’s at the bottom of the page. This saves your settings.

  14. Close and re-open MAMP. Click Quit, then click the MAMP icon again to re-open MAMP.

  1. Click Start Servers. It’s on the right side of the MAMP window. Doing so will start the MAMP server with your website’s source code and port preferences. Your website should now be live; people will be able to access it by entering your public IP address into a search engine.

Unless you pay for a dynamic IP service, your local IP address and, by extension, your website’s address will change from time to time.

You cannot use your local IP address to view the website from your own network, since entering it will just take you to your router’s page.