<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.cs.earlham.edu/index.php?action=history&amp;feed=atom&amp;title=Website_Hosting_with_Custom_Domain_Name</id>
	<title>Website Hosting with Custom Domain Name - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.cs.earlham.edu/index.php?action=history&amp;feed=atom&amp;title=Website_Hosting_with_Custom_Domain_Name"/>
	<link rel="alternate" type="text/html" href="https://wiki.cs.earlham.edu/index.php?title=Website_Hosting_with_Custom_Domain_Name&amp;action=history"/>
	<updated>2026-08-11T11:37:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wiki.cs.earlham.edu/index.php?title=Website_Hosting_with_Custom_Domain_Name&amp;diff=17509&amp;oldid=prev</id>
		<title>Craigje: /* Add to /etc/hosts */</title>
		<link rel="alternate" type="text/html" href="https://wiki.cs.earlham.edu/index.php?title=Website_Hosting_with_Custom_Domain_Name&amp;diff=17509&amp;oldid=prev"/>
		<updated>2019-11-06T20:06:27Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Add to /etc/hosts&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:06, 6 November 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l25&quot;&gt;Line 25:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 25:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Add to /etc/hosts=&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Add to /etc/hosts=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Add a line to /etc/hosts reading as follows:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Add a line to /etc/hosts &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;on the web server (e.g. web.cs.earlham.edu) &lt;/ins&gt;reading as follows:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;192.0.2.1 example.com&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;192.0.2.1 example.com&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Craigje</name></author>
	</entry>
	<entry>
		<id>https://wiki.cs.earlham.edu/index.php?title=Website_Hosting_with_Custom_Domain_Name&amp;diff=16912&amp;oldid=prev</id>
		<title>Craigje at 16:39, 16 November 2018</title>
		<link rel="alternate" type="text/html" href="https://wiki.cs.earlham.edu/index.php?title=Website_Hosting_with_Custom_Domain_Name&amp;diff=16912&amp;oldid=prev"/>
		<updated>2018-11-16T16:39:24Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:39, 16 November 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;We were asked to host a site for a student group, and it happens they had a domain they wanted to use. Forwarding wasn&amp;#039;t enough: they wanted the site to not appear as if originating from cs.earlham.edu. This is the guide.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;We were asked to host a site for a student group, and it happens they had a domain they wanted to use. Forwarding wasn&amp;#039;t enough: they wanted the site to not appear as if originating from cs.earlham.edu. This is the guide.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Note: This guide will be updated when we resolve some issues with SSL.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Assumptions=&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Assumptions=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Craigje</name></author>
	</entry>
	<entry>
		<id>https://wiki.cs.earlham.edu/index.php?title=Website_Hosting_with_Custom_Domain_Name&amp;diff=16911&amp;oldid=prev</id>
		<title>Craigje: Created page with &quot;We were asked to host a site for a student group, and it happens they had a domain they wanted to use. Forwarding wasn&#039;t enough: they wanted the site to not appear as if origi...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.cs.earlham.edu/index.php?title=Website_Hosting_with_Custom_Domain_Name&amp;diff=16911&amp;oldid=prev"/>
		<updated>2018-11-16T16:27:07Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;We were asked to host a site for a student group, and it happens they had a domain they wanted to use. Forwarding wasn&amp;#039;t enough: they wanted the site to not appear as if origi...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;We were asked to host a site for a student group, and it happens they had a domain they wanted to use. Forwarding wasn&amp;#039;t enough: they wanted the site to not appear as if originating from cs.earlham.edu. This is the guide.&lt;br /&gt;
&lt;br /&gt;
=Assumptions=&lt;br /&gt;
We assume you&amp;#039;re running this on CS, which uses Apache as the web server. The instructions will be different in places running nginx. This also assumes familiarity with the terminal, bind/DNS, and basic networking.&lt;br /&gt;
&lt;br /&gt;
Also, have the following information at the ready:&lt;br /&gt;
* the IP address of your web host - as an example, we&amp;#039;ll use 192.0.2.1, as per [https://tools.ietf.org/html/rfc5737 the rules]&lt;br /&gt;
* the domain name - we&amp;#039;ll use example.com&lt;br /&gt;
&lt;br /&gt;
=Domain: Replace the DNS records.=&lt;br /&gt;
&lt;br /&gt;
You&amp;#039;ll need to replace the DNS records - which indicate which IP address your domain should point to - with your own.&lt;br /&gt;
&lt;br /&gt;
First delete the old hosts. (If you need to backtrack, it&amp;#039;s usually not hard to reset to the default hosts later.)&lt;br /&gt;
&lt;br /&gt;
Add two A records:&lt;br /&gt;
* hostname @, 192.0.2.1&lt;br /&gt;
* hostname www, 192.0.2.1&lt;br /&gt;
I used Hover&amp;#039;s default 15 minute TTL, but (as we millennials say) you do you.&lt;br /&gt;
&lt;br /&gt;
No need to worry about the name servers.&lt;br /&gt;
&lt;br /&gt;
=Add to /etc/hosts=&lt;br /&gt;
&lt;br /&gt;
Add a line to /etc/hosts reading as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;192.0.2.1 example.com&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or append example.com to the existing line for your IP address.&lt;br /&gt;
&lt;br /&gt;
=Add to Bind=&lt;br /&gt;
&lt;br /&gt;
In /etc/bind/yourdomain.zone, add the CNAME:&lt;br /&gt;
&amp;lt;pre&amp;gt;example      IN     CNAME   web.cs.earlham.edu.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run service bind9 restart or your OS-specific service manager to update the bind configs.&lt;br /&gt;
&lt;br /&gt;
=Create a VirtualHost on Apache=&lt;br /&gt;
In your available sites path, in our case /etc/apache2/sites-available, copy the default (000-default.conf) file to a new file for your site:&lt;br /&gt;
&amp;lt;pre&amp;gt;cp 000-default.conf example.com.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerName example.com&lt;br /&gt;
ServerAlias www.example.com&lt;br /&gt;
DocumentRoot &amp;quot;/path/to/your/content/or/cms&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The DocumentRoot portion is where you might point to, say, a WordPress directory or a group of publicly-accessible user files. The nice thing about this is that it&amp;#039;s somewhat modular: these steps apply to CMS systems in general, not just WordPress as in our use case.&lt;br /&gt;
&lt;br /&gt;
If you want, you can also do specific configuration edits here - for example, I put the error log in a separate directory when testing this.&lt;br /&gt;
&lt;br /&gt;
Run a2ensite example.com to activate a site with the configuration you&amp;#039;ve provided.&lt;br /&gt;
&lt;br /&gt;
Run service apache2 reload or your OS-specific service manager to refresh the Apache settings.&lt;br /&gt;
&lt;br /&gt;
So:&lt;br /&gt;
&amp;lt;pre&amp;gt;a2ensite example.com&lt;br /&gt;
service apache2 reload&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Verify or Fix=&lt;br /&gt;
&lt;br /&gt;
Check example.com!&lt;br /&gt;
&lt;br /&gt;
If it didn&amp;#039;t work, retrace your steps carefully. Check for typos, skipped steps, etc.&lt;br /&gt;
&lt;br /&gt;
=A note about iterative development and DNS=&lt;br /&gt;
&lt;br /&gt;
To grossly oversimplify, a lot of programming involves fast iterations: make some change, check if it worked, if so great, else repeat with a new change. DNS frustrates that workflow because you have to wait for DNS changes to propagate. If you&amp;#039;re getting inexplicable results at some point, propagation is probably the reason. Give it time. If a long wait is bugging you, check the URL on a different computer than your usual workstation.&lt;/div&gt;</summary>
		<author><name>Craigje</name></author>
	</entry>
</feed>