Answers.Body: <p>The problem was caused by the <code>index.php</code> in the links.  I fixed by changing the WordPress Settings --&gt; Permalinks
  It was set for Custom Structure and when I changed it to Day and Name it fixed the problem. Now if I could just get the opt-out working I'd be happy...</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-11T18:27:40.020Z
Answers.LastActivityDate: 2021-08-11T18:27:40.020Z
Answers.UserDisplayName: jimcrist
Body: <p>I've installed CiviCRM 5.37.2 on a WordPress website, set up a new email address, got the DNS records working, Sparkpost is happy, did a tiny test email blast, which flowed through CiviMail and Sparkpost successfully with no bounces, but only 1 of 3 emails got delivered.</p>
  <p>I found one problem.  The links in the CiviMail header and footer are being modified with a suffix which I guess is normal. But the resulting links are invalid. For example, the link in the header is <a href="https://votersfirstwi.org" rel="nofollow noreferrer">https://votersfirstwi.org</a>  but it gets delivered as <a href="https://votersfirstwi.org/index.php/home/mailing/url/?u=1&amp;qid=4" rel="nofollow noreferrer">https://votersfirstwi.org/index.php/home/mailing/url/?u=1&amp;qid=4</a> which is an invalid URL.</p>
  <p>My other website also adds a link suffix with CiviMail, but it results in a working link.  I send out thousands of emails with that website, but it doesn't use Sparkpost.</p>
  <p>Where is this link modification happening and how do I fix it...thanks!</p>
  
Tags: <civimail><sparkpost>
Title: CiviMail --> Sparkpost -- Invalid links in header & footer
ThreadText: # CiviMail --> Sparkpost -- Invalid links in header & footer
  
  (Asked by: username_0 on 2021-08-10)
  
  I've installed CiviCRM 5.37.2 on a WordPress website, set up a new email address, got the DNS records working, Sparkpost is happy, did a tiny test email blast, which flowed through CiviMail and Sparkpost successfully with no bounces, but only 1 of 3 emails got delivered.
  
  I found one problem. The links in the CiviMail header and footer are being modified with a suffix which I guess is normal. But the resulting links are invalid. For example, the link in the header is <https://votersfirstwi.org> but it gets delivered as <https://votersfirstwi.org/index.php/home/mailing/url/?u=1&qid=4> which is an invalid URL.
  
  My other website also adds a link suffix with CiviMail, but it results in a working link. I send out thousands of emails with that website, but it doesn't use Sparkpost.
  
  Where is this link modification happening and how do I fix it...thanks!
  
  **Tags:** civimail, sparkpost
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2021-08-11. Score: 1
  
  The problem was caused by the `index.php` in the links. I fixed by changing the WordPress Settings --> Permalinks
  It was set for Custom Structure and when I changed it to Day and Name it fixed the problem. Now if I could just get the opt-out working I'd be happy...
  
  
  ---
  
  