How to fix https version of a site redirecting to the wrong domain

Some hosting providers restrict customers to a single SSL/TLS certificate per socket. (In simple terms, a socket is the combination of IP address and port number.) Since Apache listens to port 80 for non-SSL connections and port 443 for SSL connections on the same IP address, customers usually need a separate IP address for each certificate.

At the same time, you can configure Apache for multiple domains to share a single IP address using virtual hosts. Each virtual host gets its own port and Apache listens to this port, redirecting connections to the appropriate domain.

The combination of the above behaviours can sometimes cause complications when you install a single SSL Certificate on a shared IP address. Secure connections to port 443 of an IP address will be directed to the virtual host and domain assigned to that port. Thus, if you try to make a secure connection to a domain on a shared IP address, Apache will create a socket to the actual domain listening to port 443. Depending on your configuration, this domain may be a default virtual host or one that is explicitly set to listen to port 443.

The possible solutions depend on the types of configurations supported by your hosting provider. These include:

  1. Moving each domain with SSL certificates to its own IP address.
  2. Use Server Name Indication (SNI) to define separate SSL virtual hosts.
  3. Creating a default virtual host in your SSL file that does nothing but redirect to non-SSL connection.
  4. Installing a self-signed certificate on each domain name on that IP address.
  5. Making a different SSL host the primary certificate for the IP address.

Resources

How to upload a file to your server

Introduction

These instructions relate to your public website. It will show you how to upload a file to your server. Your site is controlled by a content management system (CMS) and there are several ways to achieve the same result. Here I will show you one method, but if you find it to be unwieldy, please let us know as we can suggest alternatives.

Prerequisites

You will need the following in order to upload your file:

  1. File transfer software, also known as an ‘FTP client’.
  2. Your username and passwords to login to the server. For security, I’ve sent your username and password separately. (These credentials are not the same as those used to login to the CMS and edit your site pages.)
  3. The file you’d like to upload (of course!). You can upload any file type but to make things easier for yourself, I suggest you follow the guidelines below.

Uploading a file

  1. Open your FTP client and in the connection screen, use the following settings.
    • Host or Server
    • Username
    • Password
    • Path: you may leave this blank
    • Protocol: Use FTP or SFTP
    • Port: Most clients will fill this in for you. If it doesn’t, enter port 21 if connecting through FTP, or enter port 22 if connecting through SFTP.
  2. Click the ‘Connect’ button. Once the software has connected, it should display the files currently on the server.
  3. The files on the server are organised in a hierarchy similar to your own computer. If you did not enter a path in step one, you will be placed on the uppermost level so you’ll need to navigate to your ‘files’ directory. If you don’t know where this is, please contact the project manager or developer who worked on your site.
  4. Drag your file into the window showing the server files. (Some programs also have a section displaying your local computer files so make sure you drag it into the server window.)
  5. Wait for the file to finish uploading, then click ‘Disconnect’.

Please take care when manipulating files on the server. Deleting files here will cause content to permanently disappear from your website.

Notes

About the Protocol

The protocol is the method used by the software and server to communicate.

FTP is widely supported by file transfer programs but it’s not secure. Malicious people on your network can easily intercept your password and files when connecting through FTP.

SFTP is the secure version of FTP because it encrypts the password and files. Use SFTP if your software supports it.

File Guidelines

Following these guidelines will help reduce problems when creating your link.

  1. Try to keep the file size small. Anything up to a few megabytes (MB) is acceptable on modern internet connection speeds. If you’re pushing 25 MB or more, your visitors might not like the wait.
  2. Place the file in an easy-to-find location, such as your desktop.
  3. Use only alphanumeric characters in the filename and make sure there are no spaces. If you like, you can also use dashes ( – ) or underscores ( _ ). Unless you’re quite proficient with creating web pages, using any other characters may give you problems when creating a link to the file.

    The following examples are OK:

    • my-file-1.doc
    • MyFile.doc
    • myfile1.pdf
    • document_2.txt

    These may give you trouble when creating the link:

    • Jane’s document.pdf
    • John’s file 1.doc
    • mydocument (with hidden file extension)
    • SoldFor$10.doc

File transfer software

There are many FTP client vendors and some can be downloaded from the internet at no cost. Below are a few suggestions but an internet search for ‘FTP client’ will show more.

For Microsoft Windows

  • http://filezilla-project.org
  • http://www.smartftp.com
  • http://winscp.net

For Mac OS X

  • http://filezilla-project.org
  • http://www.panic.com/transmit/
  • http://cyberduck.ch