How to Ignore Certificate Error in Wget?

Wget is one of the most popular tools in Unix-based operating systems, such as Linux and MacOS. This tool allows us to download the files directly through the command line. It’s installed by default in the majority of the Linux distributions.

This tool is so powerful and looks for all the safety parameters like SSL certificates, Date of Certificates, Type of files, and many other things. Using Wget, you can download any file and install it on your system or just store it.

But sometimes, the private servers might not have SSL certificates, and Wget shows the Certificate error. In such cases, your download process stalls. This feature is very useful for the security of the systems, as it prevents the Man in the Middle attacks. However, it can cause hindrances when file downloads through Terminal.

Fortunately, I faced this issue earlier and wanted to share a solution. In this post, I am sharing my way of making Wget ignore Certificate Error in Linux.

How to Ignore Certificate Check in Wget?

What is a SSL Certificate?

In the world of the Internet, data transfer is done through various protocols. The SSL or Secure Socket Layer protocol, is one of the most common and secure versions. It encrypts the communication between the web browser and the web server. All of the websites must have SSL certificates, as the web browser will show a certain warning on your screen if the website does not have an SSL certificate.

Before SSL, there was TLS or Transport Layer Security, which is still in use in many cases. Both of these protocols are important for the internet security. Ignoring the SSL certificate warnings.

How to Ignore Certificate Error in Wget ?

It’s quiet easy to instruct Wget to ignore the SSL Certificate check on certain domains. Here are the steps that you need to follow.

  • First of all, Open the Terminal. You can do it through the Applications Menu or through “Ctrl + Alt + T” key combination.
  • After that, check if your system has wget installed or not. You can do it by pasting the following command.
wget --version
  • If it’s installed, proceed to the next step. Otherwise, install it through APT Install method.
sudo apt install wget
  • Once installed, you have to let wget know which domain to ignore for SSL certificate check. Here is the exact command for the same.
wget --no-check-certificate https://example.com
  • In this command, replace the “https://example.com” to the domain name that is giving you the error. You have to add the Root domain and not the entire URL.
  • If you want to add the domain in the Accepted list to avoid following this step all the time, here is the command.
wget -d https://example.com
  • With this command, the domain will be added to the list of accepted domains and will not check for the SSL certificates in the future. Make sure to replace the “example.com” to the domain that you want to download from.

You have to be extra careful while using this method as it can expose you to various security risks. Even though Linux is quite strong from a security perspective, you have to be careful.

Conclusion

Wget is a powerful tool and provides you with many parameters for ease of use. This tool can download any file from the internet and save it with the desired file name. Unlike other downloader apps, the download speed is highest with the Wget.

I tried my best to explain everything about the ways to ignore SSL certificate checks with Wget. It’s risky, and you have to do it with caution. That’s why I recommend it only to advanced Linux users who have ideas about security and safety. If you are facing any issues with this tutorial, ask me, and I’ll be there to help you.

Posted In :

Leave a Reply

Swaraj Nandedkar