NAP consistency: what Google says about name, address and phone, and one place to keep them in WordPress
Google asks for a business's real-world name, an accurate address and a phone number the business controls. Its guidelines and its local ranking page say nothing about directory listings having to match. On your own WordPress site, keep the three in one place so no copy goes stale.
- By
- WP Ministry
- Published
- Tested on
- WordPress 7.1.3, PHP 8.3.35
In short
- NAP is short for name, address and phone number. "NAP consistency" is the advice that the three must match on every site that lists a business.
- Google's guidelines ask for the real-world name, "as used consistently on your storefront, website, stationery", a precise address and a phone number under the business's control.
- Google's page on local ranking names relevance, distance and popularity. Neither it nor the guidelines mentions directories, or says that listings elsewhere must match.
- Google does say it compiles a profile from several sources, the business's own website among them, and may update a profile from them.
- On a WordPress site the details are usually typed by hand in several places. One small file can hold them once and print them in the footer, in pages and in the markup.
- A search of the database finds the copies that were typed by hand, including old ones that no visitor sees.
NAP is short for name, address and phone number. "NAP consistency" is the advice that the three must read the same on every directory and listing site that mentions a business, usually with a warning that Google ranks a business lower when they do not. Google's own pages ask for something narrower: a name that is the business's real name, an accurate address, and a phone number the business controls. None of the Google pages read for this guide says that listings in directories must match, or that a mismatch lowers a ranking.
What a site owner fully controls is the website. There the usual fault is plain: the address and the phone number are typed by hand in four or five places, and after a move one is left behind. The second half of this page keeps them in one place on a WordPress site and finds the copies that were typed by hand.
What Google's pages say
About the name
Google's guidelines for representing a business say: "Your name should reflect your business's real-world name, as used consistently on your storefront, website, stationery, and as known to customers." The consistency asked for is between the Business Profile and the business itself: its sign, its website, its paper.
About the address
The same guidelines: "Use a precise, accurate address and/or service area to describe your business location. P.O. boxes or mailboxes located at remote locations aren't acceptable."
About the phone number
The guidelines ask for "a phone number that connects to your individual business location", and add two lines:
- "Use a local phone number instead of a central call center helpline number whenever possible."
- "The phone number must be under the direct control of the business."
About local ranking
Google's page of tips for local ranking says: "Local results are mainly based on relevance, distance, and popularity." The third factor's section is headed "Prominence", and says it is "also based on info like how many websites link to your business and how many reviews you have".
The same page says "Businesses with complete and accurate info are more likely to show up in local search results". That sentence is about the Business Profile: it sits under the heading "Keep your business information up-to-date". The page also says: "There's no way to request or pay for a better local ranking on Google."
About where a profile's details come from
This is where Google's documentation does connect a profile to the rest of the web. Its page on how it sources business information says "Information in profiles is compiled from a variety of sources", and lists among them "Publicly-available information, such as crawled web content (e.g., information from a business' official website)" and "Licensed data from third parties".
A second page says what Google may do with it: "If sources report that your profile info is incorrect or outdated, Google may update your profile." When a user suggests an edit and the owner does not answer within four days, Google "may automatically publish the update if it is supported by other publicly available information, such as your business website".
What Google's pages do not say
| The statement | Where it stands |
|---|---|
| The profile's name should be the real-world name, the one on the storefront and the website | Google's guidelines |
| The address must be precise and accurate, and the phone number under the business's control | Google's guidelines |
| Google compiles a profile from sources that include the business's website and licensed data, and may update the profile from them | Google's help pages |
| Listings in directories must match one another | On none of the Google pages read for this guide |
| A mismatch between listings lowers a business's local ranking | On none of them |
| A business needs a certain number of matching listings | On none of them |
The word "directories" appears nowhere in Google's guidelines for representing a business or on its local ranking page. A page that gives matching listings as Google's rule is repeating an industry belief.
That does not make the belief false. Google says it keeps the details of local ranking confidential, "to make the ranking system as fair as possible for everyone", so nobody outside Google can show that mismatched listings are counted, or that they are not. What can be said is that the rule is not one Google states, and that a score from a tool that measures it is the tool's own.
Why keep the details the same anyway
The reasons that stand on something are practical.
- A customer acts on what they find. Someone who finds an old phone number calls nobody, or a stranger. An old address sends them to a closed door. That is true of your website, your profile and any listing a customer lands on.
- Google lists your website among the sources of your profile. By its own account it may publish a change to a profile that your website supports. A stale number left on one page of the site is a number Google can read.
- The markup has to match the page. For
LocalBusinessstructured data Google listsnameandaddressas required andtelephoneas recommended, and its general guidelines say: "Don't mark up content that is not visible to readers of the page." LocalBusiness markup on WordPress covers the properties.
So start with the place that is yours: make the website say one thing everywhere, then make the Business Profile say the same. If the business is missing from Maps altogether, that is a different problem, with its own checks.
Where the details end up on a WordPress site
On most sites the name, address and phone number are typed by hand each time they are needed:
- in the footer
- on the contact page
- in a widget or a sidebar
- inside sentences on other pages
- in an SEO plugin's settings, for the markup it prints
Each is a separate copy, and a change made in one leaves the rest as they were.
Keep the details in one file
The steps below were run on a new WordPress with a block theme, Twenty Twenty-Five, and no plugin. One small file holds the details. Shortcodes print them in the footer and in pages, and the same values are printed as LocalBusiness markup on the home page.
Step 1: Create the file
In
wp-content, open the foldermu-plugins. Create it if it is not there: a new WordPress has none. Save the code below in it asbusiness-details.php, with your own details in place of the example's.A must-use plugin is, in WordPress's words, "automatically enabled": there is nothing to activate. It is listed on the Plugins screen under Must-Use, cannot be switched off there, and gets no update notices. To remove it, delete the file.
If an SEO plugin or other code already prints
LocalBusinessmarkup, leave out the last part of the file, from the comment about markup down. Two blocks of markup for one business are two copies again.wp-content/mu-plugins/business-details.php<?php /** * Plugin Name: Business details * Description: The name, address and phone number, kept in one place. */ // The one place. Change a value here and every page that prints it changes. function example_business() { return array( 'name' => 'Example Dental Studio', 'street' => '120 Example Street', 'city' => 'Anytown', 'region' => 'VT', 'postcode' => '05000', 'country' => 'US', 'telephone' => '+1 802-555-0142', ); } // [business_name] add_shortcode( 'business_name', function () { return esc_html( example_business()['name'] ); } ); // [business_address], on one line. add_shortcode( 'business_address', function () { $b = example_business(); return esc_html( "{$b['street']}, {$b['city']}, {$b['region']} {$b['postcode']}" ); } ); // [business_phone], as a link a phone can dial. add_shortcode( 'business_phone', function () { $number = example_business()['telephone']; $dial = '+' . preg_replace( '/\D/', '', $number ); return sprintf( '<a href="%s">%s</a>', esc_url( "tel:$dial" ), esc_html( $number ) ); } ); // The same values as LocalBusiness markup, on the home page. add_action( 'wp_head', function () { if ( ! is_front_page() ) { return; } $b = example_business(); $data = array( '@context' => 'https://schema.org', '@type' => 'LocalBusiness', 'name' => $b['name'], 'address' => array( '@type' => 'PostalAddress', 'streetAddress' => $b['street'], 'addressLocality' => $b['city'], 'addressRegion' => $b['region'], 'postalCode' => $b['postcode'], 'addressCountry' => $b['country'], ), 'telephone' => $b['telephone'], 'url' => home_url( '/' ), ); printf( "<script type=\"application/ld+json\">%s</script>\n", wp_json_encode( $data ) ); } );Step 2: Print the details in the footer
Go to Appearance, then Editor. Under Patterns, open Template Parts and choose the footer. Delete the name, address and phone number that are typed there, add a Shortcode block in their place, and type three lines into it.
Save. WordPress runs shortcodes over a block template's output as well as over a page's content, so every page that has the footer now prints the details from the file.
text[business_name] [business_address] [business_phone]Step 3: Use them inside pages
A shortcode also works in the middle of a sentence. On the contact page, or anywhere else the details are written out, replace the typed copy with the shortcode.
textCall [business_phone] or visit [business_name] at [business_address].Step 4: Check what a page serves
This command prints every phone link on a page and the number in its markup, with a count of each. Run it on the home page and the contact page, with your own address between the quotes.
bashcurl -s "https://example.com/" | grep -Eo 'tel:[^"]*|"telephone": ?"[^"]*"' | sort | uniq -c
On the home page of the test site the command printed two lines: the number in the markup and the link in the footer. They are one number, written two ways.
1 "telephone":"+1 802-555-0142"
1 tel:+18025550142A third line with a different number is a copy that does not come from the file. In the page's source, an address inside the markup is written with \/ in place of /. That is how the JSON is encoded, and it reads as the same address.
Change a detail once
When the number or the address changes, open business-details.php, change the one value and save. Nothing else is edited.
On the test site the phone number in the file was changed and both pages were requested again. The footer of each, the sentence on the contact page and the markup on the home page carried the new number, and the old one was on neither page. If the site has a page cache, clear it, then run the command from the last step on both pages again.
Find the copies typed by hand
The file only helps where its shortcodes are used. To find the copies that were typed, search the database for the old number. This needs WP-CLI on the server.
wp db search '555.?0117' --regex --all-tables-with-prefixThe pattern is the last seven digits of the old number with .? where a separator may be, so it finds 555-0117, 555.0117 and 5550117 alike. Search for an old street the same way, without --regex: wp db search "88 Old Road". On a test site with the old number left in a page and in the tagline, the search printed three matches.
wp_options:option_value
5:Dentistry at 88 Old Road. Call 802.555.0117
wp_posts:post_content
7:weekdays, 9 to 5. Questions? Call (802) 555-0117.</p>
<!-- /wp:paragraph -->
wp_posts:post_content
8:weekdays, 9 to 5. Questions? Call (802) 555-0117.</p>
<!-- /wp:paragraph -->Each match gives the table and column, then the row's number and the text around the match. A row in wp_posts is a page, a post, a pattern, a template part or an old version of one. This says which, with the row's number in place of 123:
wp post get 123 --fields=post_type,post_status,post_titleHere row 7 was a page and row 8 a revision of it. WordPress keeps a record of each published update, so the search goes on finding the old number in a page's revisions after the page is corrected. On the test site, once the page and the tagline were corrected, the one row still found was a revision. No visitor is served a revision, and it can be left.
A row in wp_options is a setting: the tagline, a widget, or a plugin's own settings. This prints the setting's name, with the row's number in place of 123:
wp db query "SELECT option_name FROM $(wp db prefix)options WHERE option_id = 123"A copy written into a theme's files is not in the database. Search them from the folder WordPress is installed in:
grep -rnE '555.?0117' wp-content/themesReplace each live copy with a shortcode where the editor allows one. In a plugin's settings, type the new value, and note that screen as a place to change next time.
If you cannot add a file: a synced pattern
A synced pattern does part of the same job with no code. Put the name, address and phone number in one block, open its menu, choose Create pattern, and turn on Synced. Then insert that pattern in the footer and on the contact page. WordPress's documentation says that when a synced pattern is changed, "the change will be reflected in all the places where the same synced pattern was used". On the test site one edit to the pattern changed both pages.
| One file | A synced pattern | |
|---|---|---|
| Where you edit | The file, over SFTP or the host's file manager | The dashboard |
| Footer and whole blocks on a page | Yes | Yes |
| Inside a sentence | Yes | No: a pattern is a block of its own |
| The markup | Yes, from the same values | No: the markup is a separate copy |
Write the phone number so a phone can dial it
A link that starts with tel: is one a phone can dial. The standard for it, RFC 3966, identifies a global number by a leading + and says such numbers "are unambiguous everywhere in the world and SHOULD be used". It allows hyphens, dots and parentheses inside the number, and says a tel: link "MUST NOT use spaces". Google's documentation asks much the same of the markup's telephone: "Be sure to include the country code and area code in the phone number."
So the file holds the number once, in international form, such as +1 802-555-0142. It prints that text for the reader and in the markup, and builds the link from the digits alone: tel:+18025550142.
What to do next
Once the site says one thing, compare it with the Business Profile, line by line. The local SEO checklist for a WordPress site has that step and the ones around it. WP Ministry does this work as part of local SEO for a WordPress site.
Common questions
Does NAP consistency affect Google rankings?
Google's pages do not say so. Its local ranking page names relevance, distance and popularity, and says nothing about listings matching one another. Google keeps the details of local ranking confidential, so the claim cannot be shown true or false from outside. What Google does ask is that a profile carry the business's real name, an accurate address and a phone number the business controls.
Do I have to correct every directory listing?
No Google page asks for it. The practical case is the customer: a listing with an old number sends a caller to the wrong place. Correct your website and your Business Profile first, then the listings a customer is likely to find.
Should the phone number on my website match my Google Business Profile?
Yes. Google says it compiles profiles from sources that include a business's own website, and that it may publish a suggested change to a profile when the website supports it. A number on the site that differs from the profile is one Google can read.
Does it matter whether I write (802) 555-0142 or 802-555-0142?
None of the Google pages read for this guide says that the punctuation of a number matters. For the two places a machine reads, there are stated forms: Google asks for the country code and area code in the markup, and a tel: link should hold the number in international form with no spaces.
- ResourceLocal SEO checklist for a WordPress site: the profile, the website, and what to leave out
- GuideGoogle Business Profile suspended: what it means, why it happens and how to appeal
- GuideHow to add local business schema to WordPress without a plugin
- GuideHow to request ownership of a Google Business Profile that someone else controls
- GuideLocation pages for multiple cities in WordPress: where Google's spam policy puts the limit
- GuideReview stars not showing in Google for a local business: Google's rule, and what to do instead

