A Strange New World
This is a short story about how I setup this server, which admittedly might not sound that interesting at first. I mean it has been done a million times before and just because the experience was new for me, it probably is not for you. Anyhow I want to give some insights on how the world of web looks like to an outsider coming from an iOS development background with no prior web experience. And while the setup process itself might not be that interesting, something very interesting happened at the end of it. So stay tuned!
At the beginning of every project there is an idea. In this case the idea was nothing exceptional, I just wanted to have my own website and server. Why? I must admit there is no rational reason for it. It just sounded like an interesting project, especially as the world of web hosting was totally new for me. In addition to that, there were occasions in the past were I wished I had a place to put some thoughts I had, or to talk about some project that I was working on.
So the first challenge I faced was choosing the right technology. I did not have any special requirements, as when you start breaking my goals down, what you end up with is the realization that all I really wanted was some kind of blog. Of course there are a million different ways out there to setup a blog. The first website provider I turned to was Squarespace. After signing up I was presented with a large amount of different presets, ordered by various genres. Shops, wedding sites, company sites… nothing really fit my needs and I was quickly turned away by the lack of fitting presets. Additionally, of course Squarespace is a paid service and I did not feel comfortable putting money in a site that would probably not fit my needs. So that already brings us to the end of my short excursion with Squarespace and I started looking for something else.*
I then remembered Wordpress, the system that “36% of all sites on the internet use”. I have had contact with Wordpress before when I released my first app on the AppStore some six years ago. Because when you do that, you have to provide Apple with a privacy and developer website link. Since I did not have a website at this time, I had to quickly set something up that did the job. The site still exists and is up and running today using the free tier of Wordpress, you can find it in all it’s glory here. I actually quite like Wordpress. I think it is simple to setup, yet powerful and a really good solution for most people. No wonder why so many sites are using it. As mentioned above I am already using the free tier that is provided by Wordpress and it seems that you can only setup one site using that tier. To be fair I could have used the old site and rebuild it using a new custom domain, but for some reason I decided against that approach. Maybe because it did not offer enough flexibility for me.
Back to the drawing board again. I now switched my focus away from hosting providers and site builders and tried to focus on the underlying technologies I wanted to use for the site. Since I am not familiar with HTML and only know a little JavaScript I did not entertain the idea to start something from scratch, especially since I wanted to have something up and running quite quickly. I then thought about John Gruber from Daring Fireball who I know uses Markdown for his site. I have used Markdown before, especially in the context of GitLab readmes and Jupyter Notebooks and really liked it. It offers the most basic needed capabilities for text formatting and throws in some extras. Exactly what I need, not too much, but with a lot of flexibility. What I was not aware of though, was a way to build HTML sites using Markdown. After some searching I then stumbled upon Jekyll, which is a ruby gem that can convert Markdown into a fully functioning website. Exactly what I needed! Jekyll is very straight forward to use and offers a large amount of customization options once you know what you are doing (which I do not yet). For each page of the site you create a Markdown file that will automatically be converted, it’s that simple. Additionally Jekyll offers support for blogging. In this case each post corresponds to its own Markdown file. I will not go into much further detail here, but maybe there will be a post detailing Jekyll in the future since I really like it.
Now it was the time to actually start work on the site. There are many different configuration and personalization options in Jekyll which I started to explore. I also created the basic structure of the site with the various sub-pages and blogs. It all went really well and I had some respectable site up in a few hours. All of course still running locally on my machine in a sort of preview mode that Jekyll offers. The next step was to actually setup a webserver and make the site accessible for the outside world. For this I needed a web host and as you probably know, there are many different options out there. Luckily I am a regular listener of the Accidental Tech Podcast (ATP) and never skip the ads and have therefore heard about Linode before. Linode is a webhost that offers different types of virtual servers for various different needs. One of their offerings is the nanode, a really simple virtual server that covers the most basic needs. Perfect for me! With 1GB of RAM, 1 CPU core and 1TB of network transfer per month this was the perfect offering for my needs. And at only 5$ a month even my cheap student wallet could be convinced. Taking advantage of a current promotion through ATP I could even get the first four months for free, perfect! The service offered by Linode stands in a stark contrast with the offerings of Wordpress and Squarespace that I had considered before. All you get here is your own little Linux machine in the cloud, nothing else. All the setup and configuration of the actual webserver has to be done by you over an SSH connection. While I was a little uncertain at first, this turned out to be a great challenge and learning experience for me. Setting up my own webserver from scratch was a totally new experience for me and I have learned a lot. It needs to be noted that Linode provides an array of great tutorials and help pages that can help to guide you through this process.
Now that the Apache server was running on the nanode and I had my site prepared locally with Jekyll, the only thing that was required now, was to copy the files generated by Jekyll to the server and reload. That’s it, it can be that simple! And for the first time my new site was available worldwide for everyone, a nice little moment! Altough there was a little bummer, namely that it could for now only be accessed through the servers IP address, since I had not yet setup a domain. So still not finished yet, but again one step closer to the goal. For this last problem, I was again supported through my Podcast listening activiites. A recurring sponsor on Hello Internet and other Podcasts is hover, a domain registrar. Exactly what I needed right now. So I headed over there, searched for my dream domain tomhu.eu**, registered, put in the dicount code (again!) and had the domain up and running in about half an hour, great!
And that was it, the story of my quest to my own website. Starting from some site builders and ending up configuring DNS records and Apache servers. Now that everything is finally up and running, what’s the first thing you do? Of course you will search for it on Google***! To see if anybody is even able to find the site without knowing the domain. And that’s what I did, but the results I got were not what I would have expected. Expected would have either been no results - as I know that it can take some time for a website to appear in Googles index, especially when it has limited content and is not linked to from anywhere - or some entries for the site on result page 3, burried under some unrelated stuff.
And at first sight I was quite right with my assumptions. On the first result page I was nowhere to be found. Funnily enough, I learned that day that there seems to be a young football player named Tom Hülsmann. It looks like he is an up and coming talent at Bayern Munich and some news site already calls him the “New Manuel Neuer“! Let’s wish him all the luck for his career, but I must assume that his potential success will not have a good influence on my search rankings in the future…
So far everything as expected, no results for me, neither on page 1 or 2 and also on page 3 I was nowhere to be seen between the various news articles about the upcoming football star. One short glimpse of hope on page 2: A result that was actually related to me! But not this site, but rather the team page of my (awesome) employer MOQO. I’ll take that as a partial success. But then right before I wanted to give up and stop the search for myself on the internet, there it was, in all it’s glory, complete with title and excerpt:
But wait, something’s wrong! What’s that up there? That’s not my domain! And I do not know this domain, have never seen it before. How can this happen! When searching for more specific terms it got even worse. There it was, my whole site indexed by Google, every blog post, every sub-page, it was all there but all under this dubious domain. At this point I got a bit worried.
How can this be? Remember, I have no real web experience and am therefore not familiar with all the shady stuff that might be done to a website in the wild place that is the internet. All I knew was that I did not like this, because I did not know the intentions (Did someone intentionally copy my site? Why? Why would anyone care?) and because I know that Google does not like it when the same site is served under multiple different domains (Will my site ever be shown by Google? Will it now forever remain under this dubious domain that I have no control over?). So I started researching and quickly found out that cloning websites is a common thing. Apparently the strategy is to clone a whole (popular) website, host it under a different domain, let it run for a while to build trust and then swap out all of the links on the site with advertising, spam and porn sites.
Great, so my first endeavor in the world of web will have my name forever associated with porn, or maybe even worse, who knows! I started looking into removing pages that violate copyright from the Google index which looked to be very involved and lengthy without a guarantee of success. But then I noticed something: When updating my site, the site served under the foreign domain would update instantly as well. So my first assumption, that the whole site was simply copied did not seem to be right. After some experimenting I was now sure that my site was not copied, but rather that the domain was pointing to the IP address of my nanode! This calmed me down somehow, as I no longer suspected malice towards my site specifically. My working theory now is, that the owner of that domain had rented a server at linode at some time in the past, has since shut down that linode but is still the owner of the domain and has not bothered to point it elsewhere. While this was certainly a much nicer situation, it did not remove the poroblem that my site was surpressed in the Google search results by this foreign domain pointing to my site. So I scrambled to figure out how to only allow connections to the server coming from my domain. Thanks to some helpful StackOverflow answers I actually managed to do so and point to a Forbidden page when coming from any other domain. I checked on Google and it worked, the fight was won!
At least I thought so. About a week later I wanted to configure https for my site. This all went quite well thanks to Let’s Encrypt and I was happy to be rid of the not secure badge that safari gave to my site. Paranoid as I am, I checked once again if my countermeasures against the foreign domain were still working and much to my shock I had to learn that this was not the case! My site was once again accessible through the domain? How could this be? Well I only setup the forbidden page for port 80, which is used by http but not for port 443 which is used for https. Now that I had https configured, the domain would also be a https one, use the 443 port and therefore circumvent my measures. After some playing around I finally managed to block the domain once and for all and I can now sleep in peace again. Sadly, even though the site has been inacessible through the domain for about a month now, it is still listed on Google. But my site had a chance to surface as well and all of the new content can only be indexed under the right domain. So I am looking forward to a bright SEO future!
That’s it for real this time. It was a journey and there were some scary parts but overall I am very happy with the experience. I learned a lot and tried a lot of different new things. In the end the site is up and running, certainly not yet finished but going in the right direction. I can really recommend Linode and Hover, I did not have any problems with them so far and everything went really smoothly. I also value Jekyll as a powerful tool that made this site possible.
Now it just remains to say thank you for reading and stay tuned for more content gradually making its way to this site in the future.
* While for me the relationship with Squarespace was over after a quick fifteen minutes, this did not stop Squarespace from bombarding me with “please come back” emails every couple hours for a few weeks.
** To be completely honest, my actual dream domain is tom.hu which sadly is not available, but I am very much okay with my alternative choice.
*** BTW: I also searched for me on Bing, but there was no trace of me to be found, even when searching for specific keywords present on this site. I guess no love for me from Bing…
If you have any remarks or comments, join the discussion of this post on twitter.