This email address does not belong to the same domain as the site

This email address does not belong to the same domain as the site

 In WordPress

This email address does not belong to the same domain as the site. error message shown in WordPress Contact Form 7 is not an error

Here’s What This Message Means

It means that the email address you are using for contact form 7 to receive your emails is different to your domain name.

For example: if I am using Contact Form 7 on rankya.com domain, and then provide email address to receive my emails using another domain (as shown in figure below)

shows This email address does not belong to the same domain as the site error message

shows This email address does not belong to the same domain as the site error message from Contact Form 7 User Interface

Where is the file that Generates this Error Message?

The file is within WordPress plugin folder

  • contact-form-7/includes/config-validator.php

It uses a function and PHP switch condition

public function get_error_message( $section ) {
$code = $this->get_error( $section );
switch ( $code ) {
case self::error_maybe_empty:
return __( "This field can be empty depending on user input.", 'contact-form-7' );
case self::error_invalid_syntax:
return __( "This field has syntax errors.", 'contact-form-7' );
case self::error_email_not_in_site_domain:
return __( "This email address does not belong to the same domain as the site.", 'contact-form-7' );
case self::error_html_in_message:
return __( "HTML tags are not allowed in a message.", 'contact-form-7' );
default:
return '';
}
}

How to Fix ‘This email address does not belong to the same domain as the site’ Error Message

Login to your WordPress Dashboard > Plugins > Editor > Select plugin to edit: Contact Form 7 > contact-form-7/includes/config-validator.php

Just comment out using 2 forward slashes as highlighted below
public function get_error_message( $section ) {
$code = $this->get_error( $section );
switch ( $code ) {
case self::error_maybe_empty:
return __( "This field can be empty depending on user input.", 'contact-form-7' );
case self::error_invalid_syntax:
return __( "This field has syntax errors.", 'contact-form-7' );
//case self::error_email_not_in_site_domain:
//return __( "This email address does not belong to the same domain as the site.", 'contact-form-7' );
case self::error_html_in_message:
return __( "HTML tags are not allowed in a message.", 'contact-form-7' );
default:
return '';
}
}

Did following this insight fix the error message?

Recommended Posts
Showing 8 comments
  • Chris
    Reply

    Doesn’t work! All it does is get rid of the error message. It still wont let you have an email address that belongs to a different domain

    • RankYa
      Reply

      You should check out using Easy WP SMTP, because This email address does not belong to the same domain as the site basically means the WordPress settings email address is different to the Contact Form 7 mail address, thus validation errors. This is done by Contact Form 7 team to avoid email spam and delivery issues because some web servers treat email addresses differently.

  • Lawa
    Reply

    WordPress contact form 7 is filled with errors with the validation checker. Almost 50% of site owners use different email addresses, plugin makers should know this instead of telling us This email address does not belong to the same domain as the site as an error

    • RankYa
      Reply

      I agree, Contact Form 7 plugin has really confused its users, if you know the email address is different on purpose, and you do receive this warning, then, ignore it because all is okay

  • Thanh
    Reply

    You ought to take part in a hall of fame as one of the finest and most informative website about WordPress and SEO on the web.

  • Guest Browser
    Reply

    At this time it appears like Expression Engine is the top blogging platform out there right now. (from what I’ve read). Is that what you’re using on your blog?

    • RankYa
      Reply

      When using #WordPress CMS, you will get many spam comments, there are great plugins that allow you to control comments so that your website is clean and non-spammy. Furthermore, at times, depending the spam comment, you can edit the comment and use it to your own advantage (like this particular comment which I find to be not legitimate).

      #RankYa SEO & Website Optimization Tutorial: Always respond to legitimate comments as its part of customer service for your business website. Also, when you reply to comments, you could link to other parts of your website and do so use some keywords within the comment. As far as Google is concerned, whatever is on a particular URL, becomes part of that URL itself for ranking purposes as well.

      In this example, I could extend my content using comments that include words that are of interest for this URL. Like this: This email address does not belong to the same domain as the site is a common issue with Contact Form 7 WordPress Plugin, and if you are still having problems you can try to use SMTP Mail plugins which may address the issue.

  • Deon
    Reply

    I attempted to fix this but couldn’t I think it was to do with SMTP plugin. Now I understand

Leave a Comment

0

Start typing and press Enter to search

Introduction What is WordPress