On this page
What this issue is
Web servers show a default file when someone asks for a folder. Ask for /pricing/ and the server may quietly serve /pricing/index.html or /pricing/index.php. That is normal. The problem starts when the file name itself also works as a public address, so /pricing/ and /pricing/index.html both return the same page with a 200 (OK) status.
Search engines treat each URL as a separate page. They have to guess which one to show. The home page is the most common case: /, /index.html, /index.php and /home/ can all exist side by side.
- /pricing/Preferred URL, 200
- /pricing/index.htmlSame page, also 200
- Links point to bothSignals are split
- Search picks oneMay not be yours
The folder URL is the one you want ranked. The index file URLs split links and signals.
Why it costs you leads or sales
The direct harm is small, which is why this is rated low impact. Google is usually good at merging obvious duplicates. Still, you can lose in a few ways:
- Backlinks and internal links are split between two URLs instead of adding up on one.
- Search results may show the
/index.htmlversion, which looks untidy and may not match your tracking and reporting. - Analytics reports list the same page twice, so conversion rates per page are harder to read.
- Crawl time is spent on copies instead of new pages, which matters more on large sites.
- Ad landing page URLs and campaign reports can end up on different variants of the same page.
How to check if your site has it
Try the index URLs by hand
Add
index.html,index.phpandindex.htmto your home page and main folder URLs in a browser. If the address stays the same and the page loads, the duplicate exists.Check the status code
Run
curl -I https://example.com/index.html. A 200 means a duplicate. A 301 to/is the fix working.Search Google for indexed copies
Search
site:example.com inurl:index.htmlandsite:example.com inurl:index.php. Any result means the duplicate was indexed.Check Search Console
In Google Search Console, open Pages (indexing) and look for URLs ending in index.html or index.php under statuses like Duplicate, Google chose different canonical than user.
Crawl your site
Run a crawler such as Screaming Frog and filter the URL list for
index.. Also look for internal links that use these URLs.
curl -sI https://example.com/ | head -n 1
curl -sI https://example.com/index.html | head -n 1
curl -sI https://example.com/index.php | head -n 1
# Fixed: the index URLs return 301 and a Location header pointing to /How to fix it
Do three things: redirect the index file URLs with a 301, update internal links to the folder URL, and set a canonical on the folder URL as a backup. How you do the redirect depends on your server or platform.
Apache (.htaccess)
Add the rule from the snippet below near the top of your .htaccess. It matches only direct requests for the file, not the internal folder lookup, so it avoids a redirect loop.
Nginx
Add the rewrite rule from the Nginx snippet inside your server block, then run
nginx -tand reload.Test
Run curl on the index URLs and confirm a 301 to the folder URL, with query strings handled as you intend.
Check permalinks
WordPress normally redirects /index.php/ paths for you. Go to Settings > Permalinks and save a non-Plain structure.
Redirect leftover URLs
If /index.php still returns 200 at the root, add the Apache rule to .htaccess above the
# BEGIN WordPressblock, or add a redirect in your SEO or redirect plugin.Check the canonical
Make sure your SEO plugin outputs a self-referencing canonical on the home page without index.php.
Usually nothing to do
Shopify does not serve index.html or index.php files. Test the URLs; if they return 404, there is no duplicate.
If you see an indexed copy
Add a redirect under Online Store > Navigation > View URL redirects from the old path to
/.
Check the URLs
Webflow serves pages without index.html, so these URLs normally return 404.
If an indexed copy exists
Add a 301 redirect in Site settings > Hosting > 301 redirects, from
/index.htmlto/.
Usually nothing to do
Wix does not expose index file URLs. Confirm with a quick test.
If an old copy is indexed
Use the Redirect Manager (Marketing & SEO > SEO tools > URL redirect manager) to send the old path to the correct page.
Usually nothing to do
Squarespace does not serve index.html paths. Test to confirm.
If an old copy is indexed
Add a line in Settings > Developer Tools > URL Mappings, such as
/index.html -> / 301.
RewriteEngine On
RewriteCond %{THE_REQUEST} \s/+(.*?/)?index\.(html?|php)[\s?] [NC]
RewriteRule ^ /%1 [R=301,L,NE]location ~ ^(.*/)index\.(html?|php)$ {
return 301 $1$is_args$args;
}Update internal links
Change menu, footer, button and sitemap links that point to index.html or index.php so they use the folder URL.
Set a canonical
On each page add a self-referencing canonical in the head that uses the folder URL.
Fix the sitemap
List only folder URLs in your XML sitemap.
Update ad and campaign URLs
If any ads or email links use an index URL, switch them to the folder URL. Check that the redirect keeps UTM and click ID parameters.
<link rel="canonical" href="https://example.com/pricing/" />Duplicates live
- / and /index.html both return 200
- Internal links mix both versions
- Canonical missing or inconsistent
- Reports list the page twice
One address
- /index.html returns 301 to /
- All links use the folder URL
- Self-referencing canonical on /
- Reports show one page
How to confirm it's fixed
curl -Ion /index.html, /index.php and /index.htm returns 301 with Location set to the folder URL.- The folder URL still returns 200 and the page loads normally.
- The redirect keeps query strings such as utm_source and gclid.
- A crawl finds no internal links to index file URLs.
- The sitemap lists only folder URLs.
- In Search Console, use URL Inspection on the folder URL and check the user-declared canonical matches.
Old duplicates may stay in search results for a few weeks. The 301 tells Google to consolidate them over time.
How to prevent it happening again
- Always link to folder URLs when building menus, buttons and ad destinations.
- Keep the redirect rule in your server config and in your deployment notes so a migration does not drop it.
- After a site rebuild or host move, rerun the curl tests.
- Run a crawl every quarter and filter for
index.. - Keep self-referencing canonicals in your theme or SEO plugin templates.
How FunnelGuard handles this
FunnelGuard does not check for index.html or index.php duplicates today. It is a possible future check, not something you can rely on now.
What FunnelGuard does do is run your real customer journeys on a schedule, such as lead forms, checkouts and booking buttons. It checks each step and the tracking hits sent to ad and analytics platforms, and sends one alert with a screenshot and a likely cause if a journey fails. That helps if a bad redirect on a landing page breaks the journey or strips tracking, but it will not tell you that duplicate index URLs exist.
To watch for this issue, use Google Search Console (Pages report), a quarterly crawl with a tool like Screaming Frog, and the curl checks above after any server or site change. A free read-only website audit from FunnelGuard is also available if you want a general look at your site.
Questions people ask
Is index.html duplicate content bad for SEO?
It is a minor problem. Google often merges the two URLs on its own, but you can split links and reporting between them. A 301 redirect and a canonical remove the doubt cheaply.
How do I redirect index.html to the root domain?
On Apache, add a RewriteRule in .htaccess that matches direct requests for index.html and sends a 301 to the folder URL. On Nginx, use a location block that returns 301 for paths ending in index.html. Test for redirect loops afterwards.
Why is my index.php showing up in Google search results?
Because /index.php returns the same page with a 200 status and was linked or crawled. Google found it as a separate URL. Redirect it to the folder URL, fix internal links and wait for Google to recrawl.
Should I use a canonical or a 301 for index.html?
Use a 301 redirect as the main fix, because it sends both users and crawlers to one URL. Add a self-referencing canonical on the folder URL as a backup signal.
How do I check if /index.html returns the same page as my home page?
Open the URL in a browser, or run curl -I on it. If it returns 200 and shows the same content as the folder URL, it is a duplicate. A 301 to the folder URL means it is handled.
Does a redirect from index.html keep my UTM parameters?
It depends on the rule. Rules that append the query string keep them, and rules that drop it strip them. Test with a URL like /index.html?utm_source=test and check the Location header.
Do Shopify, Wix or Squarespace sites have index.html duplicates?
Usually not, because these platforms do not serve index file paths and return 404 for them. Test the URLs to be sure, and add a redirect only if an indexed copy exists.
Related issues
- SEO-042Missing rel=canonical on indexable pagesFix guide
- SEO-053Both www and non-www versions resolve with 200Fix guide
- SEO-054Both http and https versions resolve with 200Fix guide
- SEO-055Trailing slash and non-trailing slash versions both resolveFix guide
- SEO-056Uppercase and lowercase URL variants both resolveFix guide
- SEO-058UTM or click-ID parameter URLs indexed as duplicatesFix guide