Support » Plugin: Contact Form 7 » Multisite with domain mapping validation

  • Resolved QROkes


    For this kind of sites is normal to have one domain per site. Email validation doesn’t recognize (subsites) mapped domains, so it always cause an error because the email (subsite) doesn’t belong to the main site domain.

    CF7 only validates with the main site domain.

Viewing 15 replies - 1 through 15 (of 22 total)
  • Hi, we have had exactly the same problem.

    We also have a multisite, with domain mapping and CF7 generated a lot of issues.

    We solved it by setting the validation rule in config.php to false

    see the website of contact form 7

    I’m also having similar issues with multisite/domain mapping (80+ domains). But I’m not sure changing the validation rule is the best solution as the file will be overwritten with future updates.

    I’m going to experiment with some options and will post my results.


    Thought I’d explain how I am using multisite/domain mapping.

    I have multisite setup under a subdomain and all sites are sub-subdomains of the main site. e.g. site1.subdomain.domainname.tdl, site2.subdomain.domainname.tdl etc.

    I also use domain mapping, but checking the Raw headers of the emails that come from Contact Form 7, the “Message-id:” only shows the main site url, not the sub-subdomain site url.

    e.g. Message-ID: <cf3b6307f343d15c6f0c3f806ab911e3@subdomain.domainname.tdl>

    This might be because I have “define(‘DOMAIN_CURRENT_SITE’, ‘subdomain.domainname.tdl’);” set in my wp-config file?

    CF7 will show a validation error if I use noreply@subdomain.domainname.tdl in the From field (I am using Reply-To: [your-email] in Additional Headers).

    But CF7 validation likes noreply@site1.subdomain.domainname.tdl, my concern is that this will be different from the Message-ID so could still be classes as spam?

    I think for me, I am looking for a way to set a default From email, perhaps in wp-config.php and then use a short_code in the From filed of each form that CF7 is happy to validate.

    Hope this makes sense? Any suggestions/ideas would be great.


    I understand your problem. We couldn’t figure it out.

    so we went for adding this to the config.php file

    /** The Contact Form 7 plugin configuration check. */
    define( ‘WPCF7_VALIDATE_CONFIGURATION’, false );

    @sense4seo thanks for this 🙂

    To confirm for anybody else struggling with validation on a WordPress multisite/network.

    Add the following to your websites wp-config.php file before the line: /* That’s all, stop editing! Happy blogging. */

    /** The Contact Form 7 plugin configuration check. */
    define( 'WPCF7_VALIDATE_CONFIGURATION', false );

    Hope the author could take this into consideration, should be easy take each site domain to do the validation, instead just take the main site domain. Also, it’s in total compliance of best practices.

    @takayukister Do you think it could be fixed/supported?

    Plugin Author Takayuki Miyoshi


    Still getting the same error for subsites (This email address does not belong to the same domain as the site.)

    Plugin Author Takayuki Miyoshi


    How did you implement domain mapping?

    Hi, thanks for the dev version.

    Testing (on a live site), I still get the warning if I use:-
    noreplay@properdomainname.tld (I am using WordPress MU Domain Mapping on WordPress 4.3)

    But no errors when using noreply@site1.subdomain.domainname.tld or noreply@subdomain.domainname.tld <= this I think is what I should be using as the Message-ID: is
    <a22e7898566345eeaa1cbdb2930ecce6@subdomain.domainname.tld> (the main Network url)

    I’ll keep testing and report any error.


    Discovered all sites have the error after installing the Dev update, but just clicking “Update” on the form clears the error.

    Plugin Author Takayuki Miyoshi


    Ah, yes, configuration validation runs when you save the contact form, so don’t forget to click the “Save” button.

    “Re-saving” is not working for me (testing on a live site).

    – Multisite subdirectory
    – Domain Mapping Donnchas plugin –
    – Settings: Permanent redirect and redirect admin pages to original domain are checked.

    Hi @qrokes, I wonder if it’s something to do with subdirectory?

    I am using so need to use in the From: filed.

    I am guessing you can probably just use

    I good way to check what domain the emails are being sent from is to send a test and check the email headers and look for Message-ID which will probably have a long number


Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘Multisite with domain mapping validation’ is closed to new replies.