Hi @paulcruice
A DM is a direct message (right click on my icon and then click on the envelope icon ; sorry not to have precised it to you).
Here’s a Chatgpt answer to your question (I’m on my IPhone now so I chose the easy way to write ) :
Here’s how to use an online header checker to verify that your .htaccess code is correctly adding the canonical header to PDF files:
- Choose an Online Header Checker Tool
There are several free online tools you can use to check the HTTP headers of a URL. Here are a few options:
• httpstatus.io
• webconfs.com HTTP Header Checker
• tools.keycdn.com HTTP Header Checker
- Enter the URL of Your PDF File
In the tool’s URL field, enter the full URL of one of your PDF files (e.g., Free classifieds - yourdomain.com).
- Run the Check
Click the button to check or analyze the URL. The tool will send an HTTP request to your server and display the response headers it receives.
- Look for the Canonical Header
In the results, look for a line that starts with Link:. It should look like this:
Link: https://yourdomain.com/sample.pdf; rel=“canonical”
This confirms that the canonical header has been added to the PDF file.
- Test Multiple PDFs
If you have several PDF files, repeat the process for each one to ensure that the .htaccess code is correctly applying the canonical header to all PDF files on your site.
By following these steps, you can confirm that the canonical header is properly configured for each PDF file on your site.
Alternatively, you can use the developer console in a browser like Safari or Firefox to check the headers:
- Open the PDF URL in Your Browser
Go to the URL of one of your PDF files (e.g., Free classifieds - yourdomain.com).
- Open the Developer Console
• In Safari: Enable the “Develop” menu if it’s not already active (Safari > Preferences > Advanced > “Show Develop menu in menu bar”). Then, open the Develop menu and select “Show Web Inspector.”
• In Firefox: Right-click on the page and select “Inspect Element” or press F12 to open the Developer Tools.
- Go to the Network Tab
In the Developer Tools panel, navigate to the “Network” tab. This will show all the network requests the browser makes.
- Refresh the Page
Reload the PDF file’s URL to ensure it appears in the Network list.
- Select the PDF Request and View Headers
Click on the request for the PDF file. Under the “Headers” section, you’ll see all HTTP headers for that request, including the Link header if it’s correctly set.
- Check for the Canonical Header
Look for a Link header with the canonical URL in the format:
Link: https://yourdomain.com/sample.pdf; rel=“canonical”
This approach allows you to check headers directly in your browser without any external tools.
Hope that helps.