Home/Article
Esadax JournalFAQ

How to Set Up HTTPS and Fix Insecure HTTP Links on WordPress

To identify and secure insecure http links in your website, follow these steps: 1. Understand the Problem: Insecure http links can expose your site to security risks and affect SEO. For example,

To identify and secure insecure http links in your website, follow these steps:

  1. Understand the Problem: Insecure http links can expose your site to security risks and affect SEO. For example, fonts loaded over http may not be as secure as those over https.
  2. Find the Links Using Command Line Tools:
  3. Set Up a Cron Job:
  4. Analyze Results:
    • After running the scan, check the output for files containing http links.
    • Identify which links need to be updated.
  5. Update Links Securely:
    • Replace http links with https versions wherever possible.
      • For example, change http://fonts.googleapis.com to https://fonts.googleapis.com.
  6. Verify Changes:
  7. Handle Multiple Domains/Subdomains:
    • If your site uses multiple domains or subdomains, repeat the process for each one.
    • Use wildcard certificates or configure SSL settings to cover all domains.
  8. Avoid Overuse:
    • Set cron jobs with a reasonable interval (e.g., hourly) to avoid overusing resources.

Look for lines like:

/home/user/public_html/file.php: 'stylesheet' => 'http://example.com/styles.css',

Automate the scan by creating a cron job to run the search regularly.

crontab -e
@hourly      0    1    /path/to/script.sh

Replace /path/to/script.sh with your custom script or command.

Use grep to search for http links in your website's files.

grep -rnw /path/to/website/ -e "http://"

Replace /path/to/website/ with your website's directory.

Subscribe