WWW Subdomain Makes The FQDN

Using WWW or no-WWW for web addresses sure seems to be a personal preference. I prefer to not use the www to keep things simple. Less to type, yah?

But, by leaving off the “www” in typing in a webpage address, we’re having to make an assumption or rather your browser has to figure something out. What’s the host?

Other people can’t seem to find a website unless they use the www — like they think it’s mandatory to use it. But, when there’s a different subdomain, like mail or demo, the www usually isn’t warranted.

So, what the heck is FQDN and why do we need it? It’s a question that may pop up when you’re about to install some “goody” on your website.

FQDN? It stands for Fully Qualified Domain Name which is to say a complete domain name or an absolute domain name.

FQDNs require a hostname plus a domain name.

The domain name is the web address you purchase, like sitepoint.com or wordpress.org.

The hostname is the prefix or subdomain for a web address, like www or mail or demo.

Splicing the hostname to the domain name gives one the FQDN.

Examples of fully qualified domain names:

  • www.ebay.com
  • mail.ark.edu
  • demo.oba.net

The domain bbc.com isn’t complete because we don’t know the hostname. Granted, most browsers and people will assume the hostname to be ‘www’, but you know what they say about assuming anything. 🙁

When specifying a FQDN we lose the ambiguity because the exact webpage location has been spelled out. There’s no guessing involved and that’s a good thing.

When installing a package on your server or computer you might be asked for the FQDN and now you know what that means!

The Main Points: Using a FQDN is the same thing as specifying a complete web address. FQDNs consist of a hostname plus domain name. A hostname is often assumed to be ‘www’ but it can also be the name of a server, like ‘mail’, or another subdomain like ‘demo’.

Updated Method to Create WordPress Child Themes

Twenty Ten Child Theme Mods

Once upon a time all that a WordPress Child Theme needed was to use an @import rule to bring in all the styles from the parent theme stylesheet. Evidently, that method still works as I’ve been using a couple of “old” child themes on live sites, until now.

Even so, it would be better to use updated and preferred methods for creating WP child themes. When The Codex says something is no longer best practice, we should pay attention.

Using @import to bring in other files costs us time. Nobody appreciates a slow site so any way that we can speed things up for our visitors is a good thing.

The correct method of enqueuing the parent theme stylesheet is to add a wp_enqueue_scripts action and use wp_enqueue_style() in your child theme’s functions.php.

A child theme requires one file, style.css, declarations in which will override those of the parent theme, but now we need a second file, called functions.php, to enqueue the new stylesheet. Continue reading Updated Method to Create WordPress Child Themes

Get Rid of MySQL Duplicates with SELECT DISTINCT

Well, there you have it! How do you get rid of duplicate content showing up in your nicely crafted, database-driven tables? Use the DISTINCT clarifier in your SELECT statement.

There’s no need to say more about this easy way to delete doubled data, but an example is always nice for clarity. Let’s say you’re keeping track of all the animals with whom you’ve shared your abode. The database is a simple one that collects information about your pets, their names, the type of animals, birthdates, deaths, and the history you’ve shared.

Here’s an example table produced with a simple SELECT statement. A row of data is repeated in the table because of duplicate values in the database.

Duplicate Data

Query: SELECT name, species, variety, history FROM pets WHERE history = ‘found stray’

Here’s a table produced with a SELECT DISTINCT statement. Each row is distinct and the repeated row has quietly disappeared.

Distinct Data

Query: SELECT DISTINCT name, species, variety, history FROM pets WHERE history = ‘found stray’

How did the data for ‘Highway’ get in there twice? Someone probably re-entered his information that was previously entered at an earlier date. But, now that we know how to use the DISTINCT clarifier in a MySQL query, the duplicated data is not a problem for us in presenting the data onscreen.