Sometimes you need to find a specific string everywhere it exists on your website.
I've seen this happen for several reasons
- When a brand name changes.
- When a client must change terminology on a site for legal / industry reasons.
- When a specific term is causing problems with Google Ads or other integrations.
This process usually consists of three phases-
- Find all pages which contain the matching string
- Find the specific locations in the pages which contain that string
- Updating the content, publishing, and then repeating the entire process again
Here are some approaches;
Google Search
If your site is indexed on Google
However-
- The
site:
feature is not comprehensive - Not all of your site will be indexed in Google
- There is little indication of where exactly the match was found in a page
Webflow Site Search
A quick-and dirty way to search your site content is to setup and utilize Webflow's own site search feature.
However it's highly limited-
- It prefers full words, rather than partial words
- It is not tolerant of misspellings
- It re-indexes content infrequently, typically every 4 days
Deep Search ( wget )
When you absolutely need to find everything, your best course is to download the entire HTML ( only ) of your site, and then scan it for your keyword.
Downloading the HTML of your full site
Sygnal uses Windows 11 primarily so we use wget
for this. A typical HTML-only download would look something like this;
wget --mirror --html-extension --convert-links --domains www.mysite.com -R jpg,jpeg,png,gif,css,js,ico,svg -P d:/temp https://www.mysite.com
Note;
- Your domain name will appear under domains, and as the full http:// domain. Make sure to change those to yours.
- This assumes that you have
www
set as your default domain. - The download directory in the example code is
d:/temp
, adjust yours.
This will take some time to run, but will download only the HTML of your site into that directory.
Searching your downloaded HTML
In Windows you can use findstr
and target your directory of HTML;
findstr /s /i /n "search_term" D:\temp\*.*
To clean up these files later;
rmdir /s /q www.mysite.com
Finding the specific text in your page
For surface-level text that's exposed to the user, you can view you page in a browser and CTRL+F to find the matching text.
However this will not find hidden text, text in URL paths, image alt text, or META descriptions- which matter a lot in certain situations.
Therefore to get more precise, you'll likely need to open the page and use Chrome devtools to locate the specific text.
- Open the page
- CTRL+SHIFT+I to open Chrome Devtools
- CTRL+SHIFT+F and search for the matching text
This will show you exactly where it is in the HTML.