User Tools

Site Tools


information-technology:2019-web-hosting
                      change site colors:
                      

Owner's Manual to Having Your Own Website

This article will help you in selecting domain and web hosting providers, along with other aspects of running and maintaining a website. Not much has changed between 2019 and 2023.



Coming Up With a Cool Domain Name

.com is now lame. Everything is taken. You want a short domain name. Take advantage of all the new TLD's, and all the country codes. Be inventive and use a complete word that has the TLD included. Use misspellings. For example, register a domain name like sereni.li (serenity). A thesaurus is helpful.

The following sites can help you come up with a domain name:
https://www.wordhippo.com/what-is/word-finder-unscrambler.html
https://datayze.com/alternate-spelling-finder
https://tld-list.com/tlds-from-a-z
https://tld-list.com/tld/li ← just replace the li with the tld you want to try



Domain Registration

Way back in the day I read warnings that you shouldn't have the domain name registrar and web hosting provider be from the same company.

Your site could have a DDOS attack, or have a server crash, but you can still reach the registrar and point your domain to another host. Or, if you are running a pirate domain, and the government wants to shut you down, they will more than likely go after the domain registrar to take down the website. It's nice to have your actual website files with another company, so not all your eggs are in one basket.

Pay attention to the renewal cost when comparing registrars. Sometimes registrars offer a promotional price for new registrations. If you can lock in a promotional price for 5 or 10 years, then in the future you can still transfer the domain to a different registrar if the renewal price is exorbitant.

I chose NameSilo, because they have good prices for .com, .net, and .org domains, and because they are one of the top 15 registrars. I prefer not using one of the top 5. I am monopoly-averse. NameSilo has a third the number of domains as NameCheap, which I also have some domains with. I think the biggest registrar is Godaddy. NameSilo on Reddit/SelfHosted

The one setting that must be configured with the registrar, is pointing the domain to the web hosting.

Pointing the domain to the hosting server

Accessing your site before DNS propagation is complete

You can also use this trick to bypass a CDN or load balancer in case of a malfunction. You can also measure the supposed improvement in page loading time afforded by a CDN.

Free registrars



Researching Web Hosting Options

I have chosen shared hosting, as it is economical and gives me enough control to make the sites I want, without having to maintain a server on my own. You can have a managed VPS, or managed VPS Cloud, but that costs more.

My requirements are:

  • a linux server with cPanel

Nice features:

  • live chat support 24/7 with low wait time
  • multiple site capacity (addon domains)
  • integrated SSL
  • integrated CDN
  • incremental backups (cPanel)

Because I use Dokuwiki with many plugins:

  • multi-php manager (cPanel)

Though free hosting will not likely have responsive technical support, you can also make use of their forums.

Web hosting review sites

Is the web hosting service a reseller?

Fraud Rating by Host IP Address

Offshore Hosting for Privacy

Local Hosting for Lower Latency

Example Hosting Services

Free Hosting Services listed at BlackHatWorld



Website Performance and Uptime Monitoring

FreshPing and Pingdom are no longer free

I have this site on bigbytes.net shared hosting. It's performance has been pretty bad according to hrank. I started with bigbytes over a decade ago.

One thing bothering me currently is that unlike a bunch of sites (google.com, cnn.com, a hostinger host, thenewleafjournal.com, etc), both mekineer.com and bigbytes.net cannot respond reliably to ping requests.

Unreliable Server Ping Response

Despite the dropped packets seen above, the site seems to load reliably for me. Can I rely on freshping or pingdom to tell me if my bigbytes hosting service is reliable? Can I rely on the server load display in cPanel? The thread on StackExchange states: “The best way to tell if any given remote service is alive is to ask it to service a request in the way it's meant to - in fact it's the only way to truly know something is working correctly.”

So I tried a free go at the loadster.app website. This online app tests the website under load. The results are rather long so click below to expand the section. Looks like the server just stopped responding through some of the testing.

Loadster.app Results

GTmetrix Results

GiftofSpeed Results

More Testing Tools

I also tried clearing my browser cache before loading my site. I then notice that my site takes forever to load. So new visitors probably are discouraged from visiting because of the long wait.

One way to track website performance is with a logging tool installed on the server. The logging tool requires that JavaScript be run on the user's web browser, so incomplete downloading of a web page will not be recorded. Incomplete logging will be exacerbated by a server that becomes unresponsive under load.

An analytics tool that includes a performance plugin is Matomo. Matomo can be installed from cPanel. With Matomo I can see average load times per day per page.

Matomo page performance metrics

After a month of looking at different tests, there was a lot of variability. Bigbytes.net speed is unreliable. While sometimes giving good results, the server load, and the server's available bandwidth must sometimes become saturated.

Message from Bigbytes



CDN Content Delivery Network

Some web hosting providers include a free CDN service, usually found as a cPanel plugin you can enable.

CDNs use Anycast for lower latency

Cloudflare offers this Anycast feature. I bring up Cloudflare because it dwarfs other CDN providers with its market share. While Cloudflare has a free plan that may speed up load times, it is not without issues:

CloudFlare delivers great DNS speeds worldwide and they have a really well designed control panel for managing DNS hosting, combine that with a premium free service and you get a powerful and very attracting DNS hosting solution for bloggers, webshop owners, and anyone else who owns a website. However, what most people overlook is that CloudFlare, in the name of security, every day blocks millions of valid users from visiting the websites that CloudFlare has registered in their hosting service. https://unixsheikh.com/articles/stay-away-from-cloudflare.html

Free unreliable CDN just worsens unreliable hosting

More articles denouncing Cloudflare

Nuances of the terms cloud hosting and CDN

Example CDN services


Foray into Hostinger plus Cloudflare

I thought it would be awesome to choose an offshore host and then use CloudFlare for the worldwide low latency. That was before I was fully educated about Cloudflare.

Searching for free CDN options in 2019

I chose Hostinger which included cloudflare integration. What I liked most about Hostinger is that they are quick to answer questions via chat. Also, kudos that they are an employee owned company! Wikipedia

I used Cloudflare for a couple of years. I couldn't get into it. In the end I chose simplicity. Why have a man-in-the-middle? My website loads quickly because it is lightweight, so I shouldn't have need for a CDN. For the Average Joe, CDNs introduce more problems than they solve (see section above). KISS Keep It Simple Stupid.

Update 2023:

Hostinger went downhill. They ditched cpanel and introduced their own “hpanel”, which is marketing-oriented and GoDaddy-like. For example, what takes one step in cpanel to add an addon domain takes 10 steps in hpanel, where you aren't even sure what the heck it is they're asking you despite having years of experience setting up websites.

Also, while they still respond in chat pretty quickly, good luck trying to initiate a chat. You have to navigate the labyrinth that is their automated help to hope to get to the chat option.


Load Balancing

To reiterate, the simple solution is to have a reliable and responsive web hosting service, along with a lightweight website, and not use a CDN.

As an intellectual exercise, could a load balancer be used with logging to track hosting service performance?

In the CloudFlare dashboard, I couldn't find load balancing, in the form of being able to input different hosting servers. I didn't see anything like it in their useless-feature-packed user interface. Also, trusting Cloudflare would be its own issue.

Perhaps there is a load balancing service which lets you input two or three shared web hosting servers which host the same web site? Could I set one up myself? HaProxy is an open source load balancer. Nginx is an open source web server with excellent load balancing capacity. cPanel doesn't have load balancing but there has been discussion of adding the feature. Implementation details are at: cPanel Cloud Edition Roadmap.



SSL

Hopefully, web hosting services have become like Hostinger with integrated pushbutton SSL service, so you don't need to do anything in the following sections.

Maybe Cloudflare has followed suit since I wrote the section below? When using some CDNs like Cloudflare, SSL communication also happens between clients and the CDN service,

CloudFlare SSL

First step is to get CloudFlare for your site. Then logged into CloudFlare, click on Crypto, find the SSL option and get the “Certificate” and “Private Key”. Paste these into Hostinger's Cpanel SSL option (CABundle not required). In CloudFlare, enable “Always use https”. Hostinger also has a https switch in their cpanel. I don't know the implications of both being enabled; I think one is sufficient. No apache htaccess editing required.

Shared Hosting Server Provides SSL

The following was the case with bigbytes.net.

If you are on a shared server that already supplies free shared SSL, you can do the following to redirect from http to https. Edit the root .htaccess file for your site, as follows:

The key to redirecting traffic on a global basis is to add the following to the top of .htaccess

RewriteEngine On
RewriteCond %{https} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [R=301,L]

About Mod Rewrite



File Management

Your hosting package comes with cpanel, which has a file manager built in. This is the simplest, and has the benefit of working with files directly on the server, so you don't have to waste bandwidth downloading them.

Another way, is to use an FTP client such as FileZilla. This is the traditional way. Each access method has its advantages.

With the FileZilla user interface, the local files on the left column, and remote files on the right. If you right-click on a remote file, and choose “edit”, the file will download to your system's temp folder and launch in a native editor. When you edit and save this file, FileZilla prompts asking if you want to upload the change. However, there is the limitation that you can't use native tools for batch operations on files, such as:

  • searching and replacing text
  • file comparison with a local backup, to show modified files on the server

Another way, is to mount the hosting server resource as a local drive. For this, there are programs like WebDrive, NetDrive, and Mountain Duck. Compare this with sync applications such as Google Drive, Mega, or Dropbox, which require a local copy of the files on your hard drive. Either of these methods has the advantage of being able to use native tools when working with files on the server, without having the manual steps of downloading them first, uploading them last.

The protocols used to work with online files as if they were local, are WebDav and SFTP (which is not related to FTP or FTPS). I believe some companies such as Google and Amazon have proprietary protocols for their file hosting, although they may also allow standard WebDav or SFTP connections. (verify) I think SFTP may be superior to WebDav, to use native tools, based on this thread. More info on mounting internet drives in the file sync and backup article.



Email Server

Sometime between 2006 and 2009, I tried to depart from Gmail or other web-based providers, by having email on my web hosting server. It didn't work out well, because a little too often my messages were getting routed to people's spam folder. Maybe because I was on a shared web host, and thus maybe my server was blacklisted? That didn't seem to be the case, and yet still my messages were sometimes in people's spam folder. Maybe if I paid for a dedicated IP, I wouldn't be blacklisted?

I gave up and started using Google Workspace (formerly known as Gsuite, formerly known as Google Apps, just to confuse the heck out of you). I hoped to return to using my own server for email, but the forces that be made it hard for me to do so.

Back to the present. I used a website to test the “spaminess” of emails from my web servers:
https://www.mail-tester.com
https://mxtoolbox.com
In the results, they recommended using DKIM. So I enabled DKIM in Hostinger's cpanel → emails → “mail service control”. Normally, that would be it, since Hostinger would be the acting DNS server. However, I was using Cloudflare for DNS. So I needed to add the DKIM records to Cloudflare.

In Hostinger's cpanel → advanced → “dns zone editor”, I copied the “host” and “txt” values for DKIM, and pasted them into Cloudflare's DNS records. The records will look like this:

host [ very-jumbled-alphanumeric-string._domainkey ]
txt [ v=DKIM1; k=rsa; p=the-longest-mofo-jumble-of-characters-ever-taking-up-several-lines ]

So on the mail-tester site, I have a score of 10 now, despite not having a DMARC record. Mxtoolbox lists some other issues. I may look into DMARC someday maybe.

carriedils.com doesn't recommend mixing email with web hosting. For example, she cites down-time, and difficulty of setup. However, neither of these bother me much.

Update: I joined a Diaspora pod, and emails from that community ended up in my gmail spam folder. Upon closer inspection, I saw that the email had a DKIM signature. Perhaps the DKIM was not set up correctly? I think Google, Outlook, Yahoo, etc have a self interest to make it impossible to have self-hosted email.

After self-hosting my email for twenty-three years I have thrown in the towel, ycombinator.com

Mail Server with Subscription

I used gmass.co to test the “spaminess” or deliverability of emails from my email addresses.

3 of 19: A gmail address had 3 out of 19 end in the spam folder.
5 of 18: A molbio.science address with working dkim and spf on hostinger/cloudflare had 5 out of 18 end up in the spam folder.
0 of 19: A protonmail address, and 0 out of 19 messages ended in spam (protonmail would not let me send to the full number of recipients, so I had to wait an hour before trying again. I could only send to 6 recipients at a time, 12 per hour).
2 of 19: A grandfathered gsuite account with my nerdondemand.com domain had 2 out of 19

gmass.co is not affiliated with protonmail.

A factor could be the number of recipients a message is sent to. To be a fair comparison, I would have to send to 6 recipients at a time from all the accounts, but I'm out of patience.

Sending from a server with a better reputation has the best effectiveness? Supported by this reddit tweet: https://www.reddit.com/r/ProtonMail/comments/9oztoc/people_dont_get_your_proton_email

“This can happen with all email providers as every provider has their own custom filtering systems and some false positive rate. If you are a paid user, the @pm.me domain has the highest deliverability rates since it's paid only.” - Protonmail Team

Like with Gsuite (and maybe also regular gmail accounts), you can use protonmail with your own domain: https://protonmail.com/support/knowledge-base/set-up-a-custom-domain



Web Analytics

I've been using Matomo. Installation is easy via cPanel Softaculous. It's huge and slow loading. I think disabling plugins you won't use helps.

I disabled the following plugins

I'm interested in trying something else. The article Ditch google analytics now: 7 open-source alternatives, Vladimir Klepov 2023 recommends Plausible and Umami. Image below from Vladimir. See also a thread on Reddit.

Alternative Analytics




Mod Rewrite and Regex

The purpose of Apache Mod Rewrite, is to redirect an incoming URL request to a new URL. You modify the original URL to something new, because perhaps you've moved your site to a different directory on the server, or you've changed to a new naming scheme for your pages. If the new naming scheme can be reliably machine translated from the old naming scheme, then you use the rewrite engine. That way, people following links to your page's old location, will still arrive at the new location.

For using Apache Mod Rewrite, you will need to understand some of Regular Expressions. Understand the dot, the asterisk, the question mark, and the () which creates a variable you can call later.

The best way to learn is to try out some expressions at https://regexr.com. They have the entry box pre-filled, so don't let that confuse you: delete it and type your own.

You can also try out your try out your “rewriting” with the htaccess tester at https://htaccess.madewithlove.be

You can also use the cpanel gui instead of manually editing the htaccess file. Basically they have a template for typical rewrites. Accessing your site's cpanel depends on your hosting provider, but can usually be found at your-domain.com/cpanel, or cpanel.your-domain.com (substitute com with your tld). In cpanel look for the redirect option.

The following coding sections are beta. They function but have not been fully tested.

Redirecting To and From a Subfolder

I used to have both Elgg and Dokuwiki installed on this site, and the root page gave you a choice of entering into either application. I ended up using only Dokuwiki. Due to wanting to skip over the root page of the site, and redirect to /dokuwiki, I added the following after “RewriteEngine On” and before the other lines above.

RewriteCond %{HTTP_HOST} ^mekineer\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.mekineer\.com$
RewriteRule ^/?$ "https\:\/\/mekineer\.com\/dokuwiki\/doku\.php\?do\=index" [R=301,L]

Eventually, I removed Elgg completely, and decided to move Dokuwiki to the root of the site. Since Dokuwiki is portable, this was easy to do, only requiring I move the files. So that any URL pointing to the old location would redirect to the new root location, I removed the previous and replaced it with:

RewriteBase /
RewriteRule ^dokuwiki/(.*)$ /$1 [R=301,NC,L]



SEO Search Engine Optimization

Importance of the URL

A website's URL is important for SEO. For example: https://mekineer.com/information-technology/2019-web-hosting VS\\ http://www.mekineer.com/dokuwiki/doku.php?id=information_technology:2019_web_hosting

In the past this site:

  • didn't use https (SSL)
  • had dokuwiki in a subfolder instead of root
  • used underscores as a word separator (including my own naming of pages and media)
  • used ugly URLs

I followed the steps to use Nice Url's, as described in the dokuwiki documentation, but incoming requests from old links still showed the ugly. This is the normal behavior for Dokuwiki, but I wasn't satisfied. I used htaccess regex to “301” tell user's web browsers and search engines that there is only the one new page, and to stop asking for the old URLs.

Google, the all powerful, say “underscore bad”, unless you are Wikipedia 1. So I renamed all my pages and media with hyphens, and used the plugin “orphans wanted” to clean up internal links. However, existing links created in the past, coming from outside my website, would not find the page's new location. So I used regex to reform the request and provide a 301. The user's web browser then requests the Corrected Nice URL, and the dokuwiki-supplied-regex does it's thing for the internal request.

Here's the current htaccess file dealing with the redirect, before going into the rewriting supplied by the dokuwiki documentation:

RewriteEngine on

RewriteBase /

RewriteRule ^dokuwiki/(.*)$ $1 [R=301,L]

RewriteCond %{QUERY_STRING} ^(id=)([^\:]*)\:(.*)$
RewriteRule $(.*)$ %2/%3 [E=underscores:Yes,QSD]

RewriteCond %{ENV:underscores} ^$
RewriteRule ".?" "-" [S=6]

RewriteRule ^(.*)_(.*)_(.*)_(.*)_(.*)_(.*)_(.*)$  $1-$2-$3-$4-$5-$6-$7 [QSD]
RewriteRule ^(.*)_(.*)_(.*)_(.*)_(.*)_(.*)$  $1-$2-$3-$4-$5-$6 [QSD]
RewriteRule ^(.*)_(.*)_(.*)_(.*)_(.*)$  $1-$2-$3-$4-$5 [QSD]
RewriteRule ^(.*)_(.*)_(.*)_(.*)$  $1-$2-$3-$4 [QSD]
RewriteRule ^(.*)_(.*)_(.*)$  $1-$2-$3 [QSD]
RewriteRule ^(.*)_(.*)$  $1-$2 [QSD]

RewriteCond %{HTTP_HOST} ^mekineer\.nerdondemand\.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC,OR]
RewriteCond %{https} off [OR]
RewriteCond %{ENV:underscores} ^Yes$
RewriteRule (.*) https://mekineer\.com/$1 [R=301,L]

The above underscore removal was necessary to be multi-line, because of a deficit of the apache rewrite engine.

Subdomain versus Subdirectory

https://www.impactbnd.com/blog/subdomains-vs-subfolders

I got a super-clear answer on webmasters.stackexchange.com about 301 redirection in the case of this being an addon-domain.

Duplicate Content on Another Domain

I wanted to duplicate the content of the health section of mekineer.com, on the domain lifehacks.science. Except I was worried about how that would affect the SEO ranking of either domain. A lot of articles are posted via syndication, so I wondered about the SEO effect. After reading many answers on the Quora question: “How does duplicate content on a different domain affect SEO?”, I decided to go ahead and do it, and provide a back link from the lifehacks domain to this one.

Sitemap

Dokuwiki creates a sitemap and pings search engines bing, google, and yahoo to look at it. However, Woorank says there is no sitemap.xml file at the root of the site. I followed the following instructions to create a symlink. The chron job command is:
ln -s /home/<username>/public_html/data/cache/sitemap.xml.gz /home/<username>/public_html/sitemap.xml.gz
(replace <username> with your actual username)

Keywords and Meta Tags

Google's Take on Meta Tags:
https://www.youtube.com/watch?v=RBTBEfd7z_Y https://www.youtube.com/watch?v=jK7IPbnmvVU

“Meta Description” tag can be used in the search engine snippet:
source

Quora response to how many keywords per page

What do you do with the keywords? Where do you use them? Tom Gustar on Quora says this is the hierarchy of importance:

  1. keyword in domain
  2. keyword in anchor text
  3. keyword in URL
  4. keyword in title
  5. keyword in meta description
  6. keyword in content ( go sparse, not heavy )

Cumulative Layout Shift

This is offensive to Google in the same way as Google's “people also search for” feature is offensive to me.

https://www.smashingmagazine.com/2021/06/how-to-fix-cumulative-layout-shift-issues/



Discussion

, 2024/09/19 22:59
I know this if off topic but I'm looking into starting my own blog and was wondering what all is required to get setup? I'm assuming having a blog like yours would cost a pretty penny? I'm not very web savvy so I'm not 100% positive. Any suggestions or advice would be greatly appreciated. Many thanks
, 2024/09/19 23:12, 2024/09/20 02:28
Hi Tonya.
Web hosting can be very low cost. Dokuwiki software is free. Look at "Researching Web Hosting Options" above. Click to expand the sections within.
Enter your comment:
F N O U J
 
information-technology/2019-web-hosting.txt · Last modified: 2024/07/21 05:46 by marcos