diff --git a/templates/AtomFeedEntry.php b/templates/AtomFeedEntry.php
index a6f03073..eca8a0f7 100644
--- a/templates/AtomFeedEntry.php
+++ b/templates/AtomFeedEntry.php
@@ -40,7 +40,7 @@ use function Safe\filesize;
if(file_exists(WEB_ROOT . $entry->Azw3Url)){ ?>
} ?>
- if(file_exists(WEB_ROOT . $entry->TextSinglePageUrl)){ ?>
-
+ if(file_exists(WEB_ROOT . $entry->TextSinglePageUrl . '.xhtml')){ ?>
+
} ?>
diff --git a/templates/OpdsAcquisitionEntry.php b/templates/OpdsAcquisitionEntry.php
index 28621844..5d2bf73c 100644
--- a/templates/OpdsAcquisitionEntry.php
+++ b/templates/OpdsAcquisitionEntry.php
@@ -53,7 +53,7 @@ use function Safe\filesize;
if(file_exists(WEB_ROOT . $entry->Azw3Url)){ ?>
} ?>
- if(file_exists(WEB_ROOT . $entry->TextSinglePageUrl)){ ?>
-
+ if(file_exists(WEB_ROOT . $entry->TextSinglePageUrl . '.xhtml')){ ?>
+
} ?>