{"id":19370,"date":"2021-12-03T15:12:58","date_gmt":"2021-12-03T15:12:58","guid":{"rendered":"https:\/\/easydmarc.com\/blog\/?p=19370"},"modified":"2025-04-28T14:11:09","modified_gmt":"2025-04-28T14:11:09","slug":"mailgun-dkim-and-spf-setup-step-by-step","status":"publish","type":"post","link":"https:\/\/easydmarc.com\/blog\/mailgun-dkim-and-spf-setup-step-by-step\/","title":{"rendered":"MailGun DKIM and SPF Setup: Step by Step"},"content":{"rendered":"\n<p><a href=\"https:\/\/www.mailgun.com\/\"><span style=\"font-weight: 400;\">Mailgun<\/span><\/a><span style=\"font-weight: 400;\"> is one of the leading email delivery services for businesses worldwide. It&#8217;s an API-based email delivery service for sending, receiving, and tracking emails. The app was founded in 2010. For the last decade, it has provided powerful APIs that enable you to send, receive and track email effortlessly whether you use Python, Ruby, PHP, C#, Node.js, or Java.&nbsp;<\/span><span style=\"font-weight: 400;\">This authentication guide will cover the Mailgun DKIM and SPF setup.<\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-setting-up-spf-and-dkim\"><b>Setting up SPF and DKIM<\/b><\/h2>\n\n\n\n<p><b>Step 1:<\/b><span style=\"font-weight: 400;\"> Head to your Mailgun portal.<\/span><\/p>\n\n\n\n<p><b>Step 2:<\/b><span style=\"font-weight: 400;\"> On the left of the screen, click on the collapsible &#8220;<\/span><b>Sending&#8221;<\/b><span style=\"font-weight: 400;\"> tab and choose &#8220;<\/span><b>Domains.&#8221;<\/b><\/p>\n\n\n\n<p><b>Step 3:<\/b><span style=\"font-weight: 400;\"> From there, add a <\/span><b>subdomain.<\/b><\/p>\n\n\n\n<p><i><span style=\"font-weight: 400;\">N.B<\/span><\/i><b><i>: <\/i><\/b><i><span style=\"font-weight: 400;\">Subdomain is important, so the MX provided by Mailgun doesn&#8217;t interfere with your root domain&#8217;s MX records<\/span><\/i><span style=\"font-weight: 400;\">.<\/span><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img fetchpriority=\"high\" decoding=\"async\" width=\"908\" height=\"808\" src=\"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/1-Add-domain-with-sub-.png\" alt=\"Add domain from &quot;Sending&quot; tab's &quot;Domains&quot; section\" class=\"wp-image-19373\" srcset=\"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/1-Add-domain-with-sub-.png 908w, https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/1-Add-domain-with-sub--300x267.png 300w, https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/1-Add-domain-with-sub--768x683.png 768w\" sizes=\"(max-width: 908px) 100vw, 908px\" \/><\/figure>\n\n\n\n<p><span style=\"font-weight: 400;\"> <\/span><\/p>\n\n\n\n<p><b>Step 4:<\/b><span style=\"font-weight: 400;\"> Mailgun will provide you with a couple of records that you&#8217;ll need to add to your DNS zone.<\/span><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1024\" height=\"662\" src=\"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/2-Records-That-Need-added--1024x662.png\" alt=\"Provided Mailgun records to be added to the DNS\" class=\"wp-image-19374\" srcset=\"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/2-Records-That-Need-added--1024x662.png 1024w, https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/2-Records-That-Need-added--300x194.png 300w, https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/2-Records-That-Need-added--768x496.png 768w, https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/2-Records-That-Need-added-.png 1173w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><span style=\"font-weight: 400;\"><\/span><\/p>\n\n\n\n<p><b>Step 5:<\/b><span style=\"font-weight: 400;\"> Copy all the records and add them to your DNS zone.<\/span><\/p>\n\n\n\n<p><b>Step 6:<\/b><span style=\"font-weight: 400;\"> Wait a couple of minutes and click &#8220;<\/span><b>Verify DNS settings.&#8221;<\/b><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"980\" height=\"303\" src=\"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/3-SPF.png\" alt=\"Adding SPF to Mailgun\" class=\"wp-image-19375\" srcset=\"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/3-SPF.png 980w, https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/3-SPF-300x93.png 300w, https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/3-SPF-768x237.png 768w\" sizes=\"(max-width: 980px) 100vw, 980px\" \/><\/figure>\n\n\n\n<p><span style=\"font-weight: 400;\"><\/span><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1025\" height=\"406\" src=\"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/4-DKIM.png\" alt=\"Adding DKIM to Mailgun\" class=\"wp-image-19376\" srcset=\"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/4-DKIM.png 1025w, https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/4-DKIM-300x119.png 300w, https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/4-DKIM-768x304.png 768w\" sizes=\"(max-width: 1025px) 100vw, 1025px\" \/><\/figure>\n\n\n\n\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"977\" height=\"255\" src=\"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/5-MX.png\" alt=\"Adding MX to Mailgun\" class=\"wp-image-19377\" srcset=\"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/5-MX.png 977w, https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/5-MX-300x78.png 300w, https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/5-MX-768x200.png 768w\" sizes=\"(max-width: 977px) 100vw, 977px\" \/><\/figure>\n\n\n\n\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"974\" height=\"270\" src=\"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/6-CNAME-for-tracking.png\" alt=\"Adding CNAME for tracking\" class=\"wp-image-19378\" srcset=\"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/6-CNAME-for-tracking.png 974w, https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/6-CNAME-for-tracking-300x83.png 300w, https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/6-CNAME-for-tracking-768x213.png 768w\" sizes=\"(max-width: 974px) 100vw, 974px\" \/><\/figure>\n\n\n\n\n\n\n\n<p><i><span style=\"font-weight: 400;\">Note: Turn off the proxy status if you&#8217;re using Cloudflare.<\/span><\/i><\/p>\n\n\n\n<p><b>Step 8:<\/b><span style=\"font-weight: 400;\"> Mailgun will validate the records for the added subdomain with a green checkmark.<\/span><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"312\" height=\"38\" src=\"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/7-Verified.png\" alt=\"Mailgun Verified badge for the subdomain\" class=\"wp-image-19379\" srcset=\"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/7-Verified.png 312w, https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/7-Verified-300x37.png 300w\" sizes=\"(max-width: 312px) 100vw, 312px\" \/><\/figure>\n\n\n\n\n\n\n\n<p><span style=\"font-weight: 400;\">Now, your Mailgun DKIM and SPF setup is complete. Now you can send DMARC compliant emails with Mailgun. (Make sure you have your aspf and adkim set to &#8220;relaxed&#8221; instead of &#8220;strict&#8221; in your DMARC record.) More about DMARC tags <\/span><a href=\"https:\/\/easydmarc.com\/blog\/what-are-dmarc-tags-dmarc-tags-explained\/\"><span style=\"font-weight: 400;\">here.<\/span><\/a><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"289\" src=\"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/8-Finale-1024x289.png\" alt=\"DMARK and SPF setup pass and aligned\" class=\"wp-image-19380\" srcset=\"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/8-Finale-1024x289.png 1024w, https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/8-Finale-300x85.png 300w, https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/8-Finale-768x217.png 768w, https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/8-Finale.png 1511w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n\n\n\n\n<p><i><span style=\"font-weight: 400;\">Note: Wait at least 24 hours to receive the updated reports.<\/span><\/i><\/p>\n\n\n\n<p class=\"vg_note\"><strong>Important note:<\/strong> If the provider recommends publishing also a DMARC record, there\u2019s no need to do so if you already have a DMARC record in place, as each domain can only have one DMARC record.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" id=\"video-config\"><p><iframe title=\"Mailgun SPF and DKIM Setup: Step by Step | EasyDMARC\" width=\"580\" height=\"326\" src=\"https:\/\/www.youtube.com\/embed\/I5Xw7Mx2sX0?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<\/div>\n<\/div>\n\n\n\n<p><span style=\"font-weight: 400;\">If you have any further questions, don&#8217;t hesitate to contact the <a href=\"https:\/\/easydmarc.com\/blog\/support\/\">EasyDMARC support team<\/a> via the <\/span><a href=\"https:\/\/easydmarc.com\/contact-us\"><span style=\"font-weight: 400;\">form on our website<\/span><\/a><span style=\"font-weight: 400;\"> or at Support@easydmarc.us.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mailgun is one of the leading email delivery &#8230;<\/p>\n","protected":false},"author":5,"featured_media":41202,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[205,209],"tags":[],"class_list":["post-19370","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-knowledge-base","category-source-configuration"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>MailGun DKIM and SPF Setup: Step by Step | EasyDMARC<\/title>\n<meta name=\"description\" content=\"Email deliverability is easier with Mailgun. But the first step before using the service is Mailgun DKIM and SPF Setup. Read to learn more!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/easydmarc.com\/blog\/mailgun-dkim-and-spf-setup-step-by-step\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"MailGun DKIM and SPF Setup: Step by Step\" \/>\n<meta property=\"og:description\" content=\"Email deliverability is easier with Mailgun. But the first step before using the service is Mailgun DKIM and SPF Setup. Read to learn more!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/easydmarc.com\/blog\/mailgun-dkim-and-spf-setup-step-by-step\/\" \/>\n<meta property=\"og:site_name\" content=\"EasyDMARC\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/EasyDMARC\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-12-03T15:12:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-28T14:11:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/MailGun-scaled.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"1618\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Hasmik Khachunts\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@easydmarc\" \/>\n<meta name=\"twitter:site\" content=\"@easydmarc\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Hasmik Khachunts\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/mailgun-dkim-and-spf-setup-step-by-step\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/mailgun-dkim-and-spf-setup-step-by-step\\\/\"},\"author\":{\"name\":\"Hasmik Khachunts\",\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/#\\\/schema\\\/person\\\/1ee4f162a98bccc5ff8b6fefdfaf245c\"},\"headline\":\"MailGun DKIM and SPF Setup: Step by Step\",\"datePublished\":\"2021-12-03T15:12:58+00:00\",\"dateModified\":\"2025-04-28T14:11:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/mailgun-dkim-and-spf-setup-step-by-step\\\/\"},\"wordCount\":327,\"publisher\":{\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/mailgun-dkim-and-spf-setup-step-by-step\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/MailGun-scaled.jpg\",\"articleSection\":[\"Knowledge Base\",\"Source Configuration\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/easydmarc.com\\\/blog\\\/mailgun-dkim-and-spf-setup-step-by-step\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/mailgun-dkim-and-spf-setup-step-by-step\\\/\",\"url\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/mailgun-dkim-and-spf-setup-step-by-step\\\/\",\"name\":\"MailGun DKIM and SPF Setup: Step by Step | EasyDMARC\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/mailgun-dkim-and-spf-setup-step-by-step\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/mailgun-dkim-and-spf-setup-step-by-step\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/MailGun-scaled.jpg\",\"datePublished\":\"2021-12-03T15:12:58+00:00\",\"dateModified\":\"2025-04-28T14:11:09+00:00\",\"description\":\"Email deliverability is easier with Mailgun. But the first step before using the service is Mailgun DKIM and SPF Setup. Read to learn more!\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/mailgun-dkim-and-spf-setup-step-by-step\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/easydmarc.com\\\/blog\\\/mailgun-dkim-and-spf-setup-step-by-step\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/mailgun-dkim-and-spf-setup-step-by-step\\\/#primaryimage\",\"url\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/MailGun-scaled.jpg\",\"contentUrl\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/MailGun-scaled.jpg\",\"width\":2560,\"height\":1618,\"caption\":\"MailGun\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/mailgun-dkim-and-spf-setup-step-by-step\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/easydmarc.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Knowledge Base\",\"item\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/category\\\/knowledge-base\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Source Configuration\",\"item\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/category\\\/knowledge-base\\\/source-configuration\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"MailGun DKIM and SPF Setup: Step by Step\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/\",\"name\":\"EasyDMARC\",\"description\":\"Blog\",\"publisher\":{\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/easydmarc.com\\\/#organization\",\"name\":\"EasyDMARC\",\"url\":\"https:\\\/\\\/easydmarc.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/easydmarc.com\\\/img\\\/logo.png\"},\"image\":{\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/EasyDMARC\\\/\",\"https:\\\/\\\/x.com\\\/easydmarc\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/easydmarc\\\/mycompany\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/#\\\/schema\\\/person\\\/1ee4f162a98bccc5ff8b6fefdfaf245c\",\"name\":\"Hasmik Khachunts\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/556e30ecef3fde7f1400ab37fa210642b14cd1a6cf57ae3d669996eb5324fc9e?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/556e30ecef3fde7f1400ab37fa210642b14cd1a6cf57ae3d669996eb5324fc9e?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/556e30ecef3fde7f1400ab37fa210642b14cd1a6cf57ae3d669996eb5324fc9e?s=96&r=g\",\"caption\":\"Hasmik Khachunts\"},\"url\":\"https:\\\/\\\/easydmarc.com\\\/blog\\\/author\\\/hasmik\\\/\"}]}<\/script>\n<meta property=\"og:video\" content=\"https:\/\/www.youtube.com\/embed\/I5Xw7Mx2sX0\" \/>\n<meta property=\"og:video:type\" content=\"text\/html\" \/>\n<meta property=\"og:video:duration\" content=\"318\" \/>\n<meta property=\"og:video:width\" content=\"480\" \/>\n<meta property=\"og:video:height\" content=\"270\" \/>\n<meta property=\"ya:ovs:adult\" content=\"false\" \/>\n<meta property=\"ya:ovs:upload_date\" content=\"2021-12-03T15:12:58+00:00\" \/>\n<meta property=\"ya:ovs:allow_embed\" content=\"true\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"MailGun DKIM and SPF Setup: Step by Step | EasyDMARC","description":"Email deliverability is easier with Mailgun. But the first step before using the service is Mailgun DKIM and SPF Setup. Read to learn more!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/easydmarc.com\/blog\/mailgun-dkim-and-spf-setup-step-by-step\/","og_locale":"en_US","og_type":"article","og_title":"MailGun DKIM and SPF Setup: Step by Step","og_description":"Email deliverability is easier with Mailgun. But the first step before using the service is Mailgun DKIM and SPF Setup. Read to learn more!","og_url":"https:\/\/easydmarc.com\/blog\/mailgun-dkim-and-spf-setup-step-by-step\/","og_site_name":"EasyDMARC","article_publisher":"https:\/\/www.facebook.com\/EasyDMARC\/","article_published_time":"2021-12-03T15:12:58+00:00","article_modified_time":"2025-04-28T14:11:09+00:00","og_image":[{"width":2560,"height":1618,"url":"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/MailGun-scaled.jpg","type":"image\/jpeg"}],"author":"Hasmik Khachunts","twitter_card":"summary_large_image","twitter_creator":"@easydmarc","twitter_site":"@easydmarc","twitter_misc":{"Written by":"Hasmik Khachunts","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/easydmarc.com\/blog\/mailgun-dkim-and-spf-setup-step-by-step\/#article","isPartOf":{"@id":"https:\/\/easydmarc.com\/blog\/mailgun-dkim-and-spf-setup-step-by-step\/"},"author":{"name":"Hasmik Khachunts","@id":"https:\/\/easydmarc.com\/blog\/#\/schema\/person\/1ee4f162a98bccc5ff8b6fefdfaf245c"},"headline":"MailGun DKIM and SPF Setup: Step by Step","datePublished":"2021-12-03T15:12:58+00:00","dateModified":"2025-04-28T14:11:09+00:00","mainEntityOfPage":{"@id":"https:\/\/easydmarc.com\/blog\/mailgun-dkim-and-spf-setup-step-by-step\/"},"wordCount":327,"publisher":{"@id":"https:\/\/easydmarc.com\/blog\/#organization"},"image":{"@id":"https:\/\/easydmarc.com\/blog\/mailgun-dkim-and-spf-setup-step-by-step\/#primaryimage"},"thumbnailUrl":"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/MailGun-scaled.jpg","articleSection":["Knowledge Base","Source Configuration"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/easydmarc.com\/blog\/mailgun-dkim-and-spf-setup-step-by-step\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/easydmarc.com\/blog\/mailgun-dkim-and-spf-setup-step-by-step\/","url":"https:\/\/easydmarc.com\/blog\/mailgun-dkim-and-spf-setup-step-by-step\/","name":"MailGun DKIM and SPF Setup: Step by Step | EasyDMARC","isPartOf":{"@id":"https:\/\/easydmarc.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/easydmarc.com\/blog\/mailgun-dkim-and-spf-setup-step-by-step\/#primaryimage"},"image":{"@id":"https:\/\/easydmarc.com\/blog\/mailgun-dkim-and-spf-setup-step-by-step\/#primaryimage"},"thumbnailUrl":"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/MailGun-scaled.jpg","datePublished":"2021-12-03T15:12:58+00:00","dateModified":"2025-04-28T14:11:09+00:00","description":"Email deliverability is easier with Mailgun. But the first step before using the service is Mailgun DKIM and SPF Setup. Read to learn more!","breadcrumb":{"@id":"https:\/\/easydmarc.com\/blog\/mailgun-dkim-and-spf-setup-step-by-step\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/easydmarc.com\/blog\/mailgun-dkim-and-spf-setup-step-by-step\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/easydmarc.com\/blog\/mailgun-dkim-and-spf-setup-step-by-step\/#primaryimage","url":"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/MailGun-scaled.jpg","contentUrl":"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/MailGun-scaled.jpg","width":2560,"height":1618,"caption":"MailGun"},{"@type":"BreadcrumbList","@id":"https:\/\/easydmarc.com\/blog\/mailgun-dkim-and-spf-setup-step-by-step\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/easydmarc.com\/"},{"@type":"ListItem","position":2,"name":"Knowledge Base","item":"https:\/\/easydmarc.com\/blog\/category\/knowledge-base\/"},{"@type":"ListItem","position":3,"name":"Source Configuration","item":"https:\/\/easydmarc.com\/blog\/category\/knowledge-base\/source-configuration\/"},{"@type":"ListItem","position":4,"name":"MailGun DKIM and SPF Setup: Step by Step"}]},{"@type":"WebSite","@id":"https:\/\/easydmarc.com\/blog\/#website","url":"https:\/\/easydmarc.com\/blog\/","name":"EasyDMARC","description":"Blog","publisher":{"@id":"https:\/\/easydmarc.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/easydmarc.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/easydmarc.com\/#organization","name":"EasyDMARC","url":"https:\/\/easydmarc.com\/","logo":{"@type":"ImageObject","url":"https:\/\/easydmarc.com\/img\/logo.png"},"image":{"@id":"https:\/\/easydmarc.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/EasyDMARC\/","https:\/\/x.com\/easydmarc","https:\/\/www.linkedin.com\/company\/easydmarc\/mycompany\/"]},{"@type":"Person","@id":"https:\/\/easydmarc.com\/blog\/#\/schema\/person\/1ee4f162a98bccc5ff8b6fefdfaf245c","name":"Hasmik Khachunts","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/556e30ecef3fde7f1400ab37fa210642b14cd1a6cf57ae3d669996eb5324fc9e?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/556e30ecef3fde7f1400ab37fa210642b14cd1a6cf57ae3d669996eb5324fc9e?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/556e30ecef3fde7f1400ab37fa210642b14cd1a6cf57ae3d669996eb5324fc9e?s=96&r=g","caption":"Hasmik Khachunts"},"url":"https:\/\/easydmarc.com\/blog\/author\/hasmik\/"}]},"og_video":"https:\/\/www.youtube.com\/embed\/I5Xw7Mx2sX0","og_video_type":"text\/html","og_video_duration":"318","og_video_width":"480","og_video_height":"270","ya_ovs_adult":"false","ya_ovs_upload_date":"2021-12-03T15:12:58+00:00","ya_ovs_allow_embed":"true"},"jetpack_featured_media_url":"https:\/\/easydmarc.com\/blog\/wp-content\/uploads\/2021\/12\/MailGun-scaled.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/easydmarc.com\/blog\/wp-json\/wp\/v2\/posts\/19370","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/easydmarc.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/easydmarc.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/easydmarc.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/easydmarc.com\/blog\/wp-json\/wp\/v2\/comments?post=19370"}],"version-history":[{"count":6,"href":"https:\/\/easydmarc.com\/blog\/wp-json\/wp\/v2\/posts\/19370\/revisions"}],"predecessor-version":[{"id":46536,"href":"https:\/\/easydmarc.com\/blog\/wp-json\/wp\/v2\/posts\/19370\/revisions\/46536"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/easydmarc.com\/blog\/wp-json\/wp\/v2\/media\/41202"}],"wp:attachment":[{"href":"https:\/\/easydmarc.com\/blog\/wp-json\/wp\/v2\/media?parent=19370"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/easydmarc.com\/blog\/wp-json\/wp\/v2\/categories?post=19370"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/easydmarc.com\/blog\/wp-json\/wp\/v2\/tags?post=19370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}