Securing your website with an SSL certificate

Securing your website with a SSL certificate has become more important. Google has decided this is an important factor in how websites are presented in Chrome.

There are several options for SSL certificates which range from free to thousands of dollars.

A free SSL certificate from Let’s Encrypt will give your site visitors confidence that their information is not leaking to the web when they interact with your site.

In addition to installing the certificate, I recommend redirecting all http traffic to your new https url. This is also a good time to choose a preferred domain, such as
https://computerwhisperer.com
as opposed to
https://www.computerwhisperer.com.

Changing your WordPress permalink format

If you have an established WordPress site, with many links indexed with Google, it is hurtful to your search results when you decide to change your posting format from something like this:
https://computerwhisperer.com/2018/06/18/sample-post/
to something like this:
https://computerwhisperer.com/sample-post/
People clicking your links will now see an error page, instead of your web posting.

Fortunately it is possible for your web server to redirect your old link format, to the newer one in your .htaccess file.

<IfModule mod_rewrite.c>
RewriteRule ^\d\d\d\d/\d\d/\d\d/(.*)$ https://computerwhisperer.com/$1 [L,R=301,NC]</IfModule>

The old link will still work, and Google will learn to index your pages with the new format.

namecheap leaks whois contact details

For namecheap domains with WHOIS privacy: If you let your domain expire, your contact information becomes publicly available. This is even though you no longer own the domain. You then have to contact them, and as a “special” exception, they will change the contact information to their own reactivation contact details.

This is incredibly unfortunate on the part of namecheap. The only workaround I know if is to put in bogus WHOIS contact information the day before the domains expire.

Create pdf thumbnails

This perl script uses ImageMagick to convert the first page of a directory structure of pdf’s into a 600 pixel wide png thumbnail.  The [0] in file.pdf[0] means to convert only the first page.

#!/usr/bin/perl -w
use strict;

my $tmp = `find . -iname '*.pdf'`;
print "$tmp\n";
my @files = split(/\n/, "$tmp");
foreach my $file (@files)
{
  my $outfile = "${file}.png";
  if (! -f $outfile)
  {
    my $command = "convert -thumbnail 600 '$file\[0\]' '$file.png'\n";
    print $command;
    `$command`
  }
  else
  {
    print "$outfile already exists\n";
  }
}