The main site


loads fine. We have a CNAME pointing from the above domain to the following domain,


however, the page source shows HTTP for all the asset files. Even the Google Font which is hard coded as HTTPs


is loaded over HTTP, why is that?

2 Answers 2


The first and most important thing to know is that your SSL certificate is tied to a SPECIFIC Domain Name.

Using a CNAME to create an alias from another Domain Name WILL route your traffic to the other URL

BUT unless you have also purchased an SSL Certificate for the other site & setup an apache configuration for the 2nd & installed your SSL certificate on that 2nd site, then most browsers will display a privacy warning telling users that they are on an encrypted page but that the domain name that is used in the SSL certificate doesn't match the one that they're visiting.

CNAME by itself doesn't do anything but redirect users to another Domain. Apache (or whatever web server you're using) still needs to be configured to serve both domains (typically via the vhosts, or virtual hosts, directive) if you want to use SSL for that 2nd domain.

I go into greater detail below, but the short version of this is that WordPress isn't designed to serve two domains from a single installation / database, so the easiest way for you to keep both domains is to simply create a redirect rule in your primary site's configuration that forwards any user who tries to access www.ptacfactoryparts.com to www.ptacunits.com


To setup forward users who visit www.ptacunits.com to www.ptacfactoryparts.com:

1.Create an DNS records for ptacfactoryparts.com that all point to the same server as ptacunits.com (Example Below, details on DNS can be found here and here):

    (Sub)domain              Type     Target
    ptacunits.com            A
    www.ptacunits.com        CNAME    ptacunits.com
    www.ptacfactoryparts.com CNAME    ptacunits.com

2.Add an apache redirect rule to route all traffic from ptacfactoryparts.com to ptacunits.com (referenced from ServerFault):

<VirtualHost *:80>
    ServerName www.ptacfactoryparts.com
    RedirectPermanent / http://www.ptacunits.com/
    # optionally add an AccessLog directive for
    # logging the requests and do some statistics

NOTE : If your web host supports cPanel, you may be able to use these instructions to configure cPanel to handle this redirection (though you still need to setup the DNS)

This should forward all traffic to the site that actually has an SSL certificate that matches its domain name.


NOTE - even if you managed to work around the design limitations of WordPress & WooCommerce I cover below, you may find the sites receive SEO penalties for duplicate content, and though the exact impact on SEO rankings has been debated, it's probably not a good idea to have exact copies of your sites hosted at different URLs.

If you do all of these and setup a second site and attempt to make WordPress serve two sites from a single installation folder & database, you may discover that WordPress doesn't like to do that much. Primarily because it uses the full URL inside of your posts and the core design of the system database configuration assumes a single base url.

You might be able to accomplish what you want (power two URL's from the same set of posts, products, and themes) by moving to a WordPress Multi-Site installation. That would potentially allow you to share the content you want to share by manage it in one place. Keep in mind that Multi-Site is a much more complex animal than the base WP and WooCommerce requires some specific configuration just to get working on a multisite install.

That thread from the official support forum seems to indicate that as it currently is designed, even if you run it on a multisite install, each site would be a separate installation of the system, meaning you have to manage each site a separate store even if they look the same.

Theoretically, you COULD potentially setup a second WordPress site in the same database, but using your other URL and manually sync all content, products, themes, etc between the two of them (or write a script to do that) without going the multisite option, but they would remain two different sites at two different URL's with two different sets of content and transactions, which doesn't sound like the goal you're aiming for.

Here's what I see when I browse https://www.ptacfactoryparts.com:

Privacy Warning Displayed by Google Chrome Browser

When I click on the left-most icon in my address bar to view the SSL details, I see two items that you'll need to resolve:

Problems with DNS of URL not matching DNS of SSL Certificate & Obsolete encryption technology used in your certificate

1. [CRITICAL] The name on the SSL Certificate doesn't match the URL you entered (you have to get a new SSL certificate or use a service like CloudFlare that offers free SSL certificates for any domain) to make sure both sites display the correct "green all-is-well" SSL Notice here. Here's more info from Google on this specific issue. If you click the "Certificate Details" link in Chrome, you'll see the following which highlights the issue:

Certificate Details in Google Chrome

2. [NOT CRITICAL] Google Chrome is indicating that your SSL certificate is encrypted with obsolete technology. There's a detailed discussion on what this means and how to address it over at the Information Security Stack Exchange Site. I'd recommend fixing this, but it appears that Chrome (not sure about other browsers) will still display a Green Icon if this is detected, as evidenced by the fact that your primary site doesn't have the same broken ssl address bar display (see final screenshot below)

Proper DNS matching one on SSL Certificate with green all is good icon

Assuming you secure a separate SSL certificate for 2nd site, you're still not quite done until you address the 2nd major issue: You are attempting to serve two separate sites under two different from a single apache site configuration (I'm assuming you're using apache as your web server here, but the same would apply if you're using nginx, though the solution would be different).

To fix this portion of the issue, you'll have to setup another site via apache's vhost directive that links to the SAME content directory as your other site so that you appear to to have two sites, fully secured, and serving up the same content. CNAME mapping won't work by itself because (at a minimum) your CNAME rule doesn't change how the assets are referenced in the actual content being rendered by WordPress on the main site. You can see in the source that there are references to the original domain in the URL's.

references to the original domain in the URL

It also appears that you're using WooCommerce and a few other theme customizations, so you will need to make some specific settings updates in order to coordinate ssl implementations between the various themes, plugins and WP base configurations which you may find covered in this post over on the Pro Webmasters StackExchange site.

Again, I'd suggest the easy route I recommend above. Please comment below if I missed something important and I'd be happy to work through the details with you.

  • 1
    I appreciate the thoroughness of your answer. I'm not understanding why when I visit ptacfactoryparts.com in the page source code, most of the links are HTTP i.imgur.com/kbzFo5V.jpg The site has been setup with hardcoded HTTPS links. I would like to know why they are being replaced. Heres the ptacunits.com HTML source: i.imgur.com/7G17dCM.jpg May 12, 2015 at 4:37
  • When you say "the site" you mean the original ptacunits.com site, correct? When you say hardcoded, you mean you view the WP editor and see https in the source code? Are you using a reverse proxy or Load Balancer / SSL offloader of some sort like CloudFlare? I updated the answer to provide an easier recommendation and also a link to a deeper discussion at webmasters.stackexchange.com/questions/81124/… that discusses the possible reasons why URL's you hardcode in WP configs & content can get changed to https. Let me know if that helps. May 12, 2015 at 5:53
  • Correct, the site is "ptacunits.com". The header.php, WordPress Home and Site URL, they all show HTTPS. The site is not using a reverse proxy or load balancer. It's hosted on a cPanel server. I even have the WordPress plugin that forces HTTPS everywhere. May 12, 2015 at 15:46
  • A little more on what we're doing with ptacfactoryparts.com, we're not trying to duplicate the content. We designed the front-page to load specific shortcodes depending on the URL entered. Afterwards, visitors are just sent to ptacunits.com. May 12, 2015 at 15:52

Issue turned out to be the "WordPress HTTPS" plugin. Disabling it allowed ptacfactoryparts.com to load asset files over HTTPS instead of HTTP. Not sure why it was overwriting the links.

  • That seems odd - that plugin actually ADDS the ability to load assets when enabled, according to the documentation: wordpress.org/plugins/wordpress-https I haven't used it myself, but did analyze it and a few other solutions in relation to this post that was similar to your earlier one where a user couldn't get their assets all encrypted (some were unencrypted and some were encrypted). They had to ADD support to show all assets via SSL whereas you're saying you removed the plugin that ADDED that support and it worked? Jun 20, 2015 at 21:45
  • Forgot the earlier link reference: wordpress.stackexchange.com/questions/185257/… Jun 20, 2015 at 21:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.