Archive for the ‘ftp’ Category

How to Upload Google Adsense ADS.TXT to a WordPress Site with Cloudways

Tuesday, September 20th, 2022

Cloudways is an awesome cloud hosting provider I use for some of my WordPress sites.

For one particular site, a Google Adsense text file (ads.txt) needed to be uploaded again.

Unlike a shared hosting company (i.e. Hostgator), Cloudways do not utilize the cPanel software so we need to either upload the file using SSH (PuTTy) or SFTP protocols.

For simplicity sake, we will use File-Zilla which is another free FTP application that has been around for a long time.

Please note that as of this writing (September 2022), there were security issues related to File-Zilla app (primarily downloaded from third-part sites) but if you download the app directly from File-Zilla.org, everything is cool.

OBJECTIVES

  • For security reasons, we do not want to use the master application credential. Instead, we want to create a separate “application credential” (sort of like creating a standard user under Windows OS)
  • Use the File-Zilla FTP software to upload the ads.txt file

DIRECTIONS

  • Step #1 – Go to File Zilla’s website (https://filezilla-project.org/) and click on “DOWNLOAD FILEZILLA CLIENT” button
  • Step #2 – Download the version you want to use with your computer OS (free version is perfectly fine)
  • Step #3 – Install File Zilla
  • Step #4 – Log into your Cloudways account
  • Step #5 – From the top menu bar (in blue), click on APPLICATIONS
  • Step #6 – Click on your WordPress application (mine was the second one)
  • Step #7 – The default screen is ACCESS DETAILS. On the right, you will see a section titled APPLICATION CREDENTIALS. If you do not have any users, click on the ADD button to add one user (you can use any user names. For password creation, make sure to mix in capital and lower case letter as well as numbers and special characters – about 20 characters should be good). After creating a user, your screen should look something like this:
  • Step #8 – Launch File-Zilla
  • Step #9 – Enter host info (which is your public IP from Cloudways). You should enter as follows:
    • sftp://xxx.xxx.xxx.xxx
  • Step #10 – Copy User name from Cloudways and paste it into File Zilla’s user name field
  • Step #11 – Copy Password from Cloudways and paste it into File Zilla’s password field
  • Step #12 – Port 22
  • Step #13 – You will most likely get a popup warning message. You can safely ignore it and click on the OK button
  • Step #14 – You need to make sure that your target WordPress root directory (on the server) is pointing to “/public_html” (see “A”)
  • Step #15 – Click and drag “ads.txt” file from the “B” window over to the “C” window

It will take about 48 hours for Google Adsense to detect this new file.

I hope you found this article to be helpful.

REFERENCE LINKS