Working Around GoDaddy’s Awful Domain Forwarding

I don’t know when it started, but as I write this (June 2018), domain forwarding on the registrar GoDaddy is awful.

At least GoDaddy forwarding is simple to set up. You click “DNS” on the domain you want to forward, scroll down to “Forwarding” and click a couple of boxes. Things would have been great if it was all there was to it.

Recently, a client acquired a company with several websites and asked me to direct all traffic from the acquired website to a single page on an established site — like “redirect anything.old-domain.com/anything to new-domain.com/some-page/“. That would have been trivial with a .htaccess file but the old hosting accounts had expired during the acquisition so the trivial solution wasn’t available. The domains were registered with GoDaddy, and forwarding the domains using GoDaddy’s deceptively simple form seemed the best solution.

After clicking the right boxes, the domains and subdomains, like old-domain.com and old-domain.com/def/ worked fine, redirecting to the base redirect url new-domain.com/some-page/. But URLs for individual pages, like old-domain.com/page.html, were redirected by GoDaddy to what seemed to be the error page of a link-shortening utility. Two long battles with GoDaddy support ended with them telling me that’s just how it is and that I don’t understand how the internet works.

Which is true enough, I suppose, but that didn’t solve my problem and luckily other people do know how the internet works.

To fix the issue (without having to purchase hosting or talk with GoDaddy support again) I set up the old domains in a Cloudflare account, pointed the GoDaddy DNS settings to the assigned Cloudflare name servers, then used a Cloudflare “Page Rule” (see image) with a couple of asterisks as wildcards to forward everything hitting the old domains to the new landing page. A free Cloudflare account provides 3 page rules, if you need more than that they cost $5/month each.

This is a workable but not perfect solution. Perfect would be for the registrar’s domain forwarding to redirect without an error page intervening, but GoDaddy has messed this up.

Screaming Performance

steveclason-pagespeedThe theme used on this site, “SwingYourPartner” (that’s what popped into my head) was built to maximize page performance. The screen-shot shows the current score on Page Speed Insights. The two Font Awesome files mentioned as things to improve are served by the CDN without expiration directives in the header, and although I could work around that by serving local copies, the advantages of the CDN outweigh the Page Speed Insights ‘score’, to my mind, because the site is fast, loading in about 2 seconds.(read more )

Override Header Layout in Avada Child Theme

I was recently asked to add a button in the header of an Avada child-theme and was surprised when a search turned up no advice. It’s not hard but takes a little digging so I’m posting this in case it might help someone in the same situation.

Avada has six header layout options, selectable from the WordPress Dashboard via “Avada > Theme Options > Header > Header Content”:

avada-header
These options map to files at “/wp-content/themes/Avada/templates”. You can override the Avada templates by creating your own in a “templates” sub-directory of your child-theme folder and copying a code block containing the action hook from “/wp-content/themes/Avada/templates/header.php” to your child-theme’s “functions.php”.

The local (child-theme) function will be called first at action-time, so the default Avada function will never be called and the local template will be loaded rather than the one in the Avada folder.

There’s a more detailed Gist at GitHub

Web Performance Improvement

page-speed[Note: there’s a new theme and other performance-related changes since this was written. A lot here is still relevant but you might also have a look here.]

A while back I noticed this site had cratered from a once-perfect Page Speed Insights score to an embarrassing 59. It took a few hours of work but I got it up to a score of 91 — more importantly, because that’s just a number, I’ve improved the actual page speed as much as I can. The things bogging me down now, and they’re not bogging very much, are out of my control unless I want to stop using Google Analytics or Jetpack for WordPress, both of which are worth a few additional milliseconds of load speed.

The only other issue is server response time. This site is hosted on GoDaddy, so what can I say — it is what it is.

Here’s more-or-less what I did and the plugins that helped:

WP Super Cache and EWWW Image Optimizer don’t require configuration and can just be installed and activated and your performance will improve. The other two can break a site — you should know what you’re doing and be prepared for some effort. Back up your site before trying them.