Feb 13, 2026

New Theme

Figure 1. Google Photos "Book & Magazine Covers" and "Posters" albums.
 Upon realizing that Google Photos had changed the format of the URLs that allow people to be directed to Photos albums such as my posters album (see Figure 1), I got help from Google's AI to learn how to edit the Theme file of the wikifiction blog. I needed an easy way to change the hundreds of links to my Photos albums that Google had broken (again).

Image generated by Grok.
The saga of dealing with Google's changes to my photo albums is a long tale of woes. Back in 2017 and 2018 I complained about the "new Google+" and how the demise of Google+ disrupted what had originally been my Picasa photo albums. Towards the end of 2018 I blogged about the ugly arrival of Google Photos. In 2020 I reflected on my 15 years of using Blogger, including the arrival of "the new Blogger". In 2025, I documented the fact that by old blogger photo albums had been taken out of Google Photos and placed withing Blogger itself.

The last time Google broke all of the existing links to my "Book & Magazine Covers" and "Posters" albums, I manually edited all of my blog posts and put in the new replacement URLs page by page. This time, I ended up editing my blog's Theme file so as to make a table of URL re-directs. Below is the discussion that I had with Google's AI in which I learned how to edit the Blogger Theme file.

CHATBOT HELP SESSION:

Me: Why is Google unable to maintain stable links to user content?

Google AI: Google's perceived inability to maintain "stable" links for user content often stems from security protocols, API lifecycle changes, and the fundamental design of how their cloud services generate shareable vs. direct URLs.

While a document's main "Share" link remains constant as long as the file exists, other types of links—especially direct image URLs or hosting links—are intentionally temporary for the following reasons: 

1. Security and Expiring Access

Image generated by Grok.
 For services like Google Photos, the direct URLs used to display images (often starting with lh3.googleusercontent.com) are frequently designed to be short-lived

  • Token Expiration: These deep links often contain security tokens that expire after a set time (e.g., 60 minutes for API-retrieved items) to prevent unauthorized "hotlinking" and protect user privacy.
  • Permissions Changes: If a user changes a file's visibility from "Public" back to "Restricted," Google immediately invalidates any previously active shareable links to ensure privacy. 
2. Infrastructure & Hosting Changes

Google has historically retired entire link formats as its infrastructure evolves: 

  • Deprecated Hosting: Google Drive's web hosting feature was officially shut down, breaking millions of links that used the googledrive.com/host/ format.
  • Security Updates: In 2021, Google applied a "Security Update" to Drive that added a resource key to many shared links. Old links without this key became broken for users who hadn't previously accessed the file, requiring the generation of new URLs. 
3. File Identity vs. Re-uploads

Image generated by Grok.
 Google identifies files by a unique ID string rather than by filename or content. 
  • New Uploads: If you delete a file and re-upload the same one, Google treats it as a brand-new entity with a different ID and a different link. To maintain a stable link while updating content, you must use the Manage Versions feature instead of re-uploading. 
4. Redirect Management When content is moved (e.g., a Google Site domain change), Google uses 301 redirectsto signal a permanent move. However, if the source account is deleted or the redirect is not properly configured at the server level, the original link will eventually resolve to a 404 error once Google's crawlers satisfy their "infinite recollection" of the old URL.

Would you like instructions on how to create a permanent "Direct Download" link for a Google Drive file that bypasses the viewer?


Me: I now have hundreds of dead links on my Blogger blog pages due to Google's inability to maintain stable URLs. Is there a tool for doing mass updates of broken URLs across multiple blog posts?

Google AI: Blogger does not have a built-in "find and replace" tool for post content, but you can achieve mass updates by manipulating your blog's backup file.

1. The Export-Edit-Import Method (Most Reliable)

Image generated by Grok.
 The most effective way to perform a bulk update across hundreds of posts is to export your entire blog as an XML file, use a robust text editor to find and replace the URLs, and then re-import it.
  1. Backup/Export: Go to Settings > Manage Blog > Back up content and download the XML file.
  2. Edit Locally: Open the XML file in a powerful code editor like Notepad++, Sublime Text, or VS Code.
  3. Bulk Find & Replace: Use Ctrl+H to find the old base URL (e.g., the dead Google Photos or Drive prefix) and replace it with the new one.
    • Tip: If you are replacing many unique URLs, you can use "Regular Expressions" (Regex) in these editors to target specific patterns.
  4. Import: Go back to Settings > Manage Blog > Import content.
    • Warning: To avoid creating duplicate posts, ensure you import the edited file back into the same blog. However, some users report that re-importing can occasionally change post permalinks, so test this with a single post or a test blog first
2. Identifying the Links

Image generated by Grok.
 Before you can update them, you need a full list of what is broken. Use these specialized crawlers to generate a report of every dead URL on your Blogger site:
  • Broken Link Check: A free online tool that scans your entire site and shows you the exact HTML "Src" (source) for every dead link.
  • Screaming Frog SEO Spider: A desktop application (free for up to 500 URLs) that can crawl your site and bulk-export a list of all 404 errors to CSV.
  • Dead Link Checker: Offers a "Multi-Check" feature that emails you a consolidated report of broken links across multiple pages. 
3. Alternative: Browser-Based Search and Replace

There is a shortcut for the Blogger editor itself, though its effectiveness across all historical posts can vary: 

  • Ctrl+Shift+R: In some versions of the Blogger post editor/dashboard, this shortcut triggers a "Find and Replace" dialogue for code or text. 

Summary of Workflow

Step 


Action

Tool Recommendation

Audit

Find every dead link and its location

BrokenLinkCheck.com

Export

Download blog data

Blogger Settings > Back up content

Update

Mass replace URLs in the XML file

Notepad++ or VS Code

Restore

Upload the fixed XML

Blogger Settings > Import content

Image generated by Grok.
 Are these broken links primarily pointing to images (like Google Photos) or to external websites? I can provide specific Regex strings to help you target those patterns in your XML file.

Me: It seems like it would be trivial for Google to put into Blogger a feature that allows for users to create and maintain a short list of known broken URLs on their blog pages and their redirects to functioning URLs.

Google AI: While it would be highly practical, Google Blogger currently restricts its

Custom Redirects feature to internal URL management. It does not offer a global "link-remapping" database for external content. 

Limitations of Current Tools

  • Internal Scope Only: The Blogger Custom Redirects tool only allows you to map a path within your blog (e.g., /old-post.html) to another path within your blog. It cannot intercept a request for an external link like ://photos.google.com and redirect it to a new location.
  • Manual Entry: Even for internal links, each redirect must be added one by one. There is no native bulk-upload feature for this list.
  • Hardcoded Links: When you publish a post, the HTML contains the static URL. Browsers follow that URL directly; they do not check a Blogger-hosted "redirect list" unless the link first points back to your own domain. 

Why This Feature Doesn't Exist

Image generated by Grok.
 Implementing this for external links would require Blogger to act as a URL shortener (like Bitly or TinyURL) for every link you post. If Blogger "wrapped" every external link in a redirect, it could manage them from a central list, but this would: 

  • Add latency to every click for your readers.
  • Potentially hurt your SEO, as search engines prefer direct links to authoritative content. 

Current "Best" Workarounds

If you frequently use links that you expect to break, the most stable long-term strategy is to use a URL Shortener with "Edit" capabilities: 

  1. Use a Service: Create links through a tool like BetterLinks or Sniply.
  2. Point to the Source: Use the shortened link in your Blogger post.
  3. Update Once: When the source URL changes, you update it in the shortener's dashboard once, and every blog post using that short link is instantly fixed. 


Me: "Implementing this for external links would require Blogger to act as a URL shortener (like Bitly or TinyURL) for every link you post." I don't believe that. What could be done is to allow a user like me to build a table with the specific URLs that google failed to maintain and the corresponding newer URL that replaces the old one. Each time someone clicks the broken URL on my blog page, it could redirect to the new functional URL.

Google AI: While Blogger doesn't offer a built-in table for external link remapping, you can effectively build your own using a custom

JavaScript snippet in your blog's theme. This allows you to maintain a "mapping table" that automatically redirects broken URLs to functional ones whenever a reader clicks them. 

How to Implement Your Own URL Mapping Table

Image generated by Grok.
 Instead of waiting for a native feature, you can inject a script into your Blogger theme that intercepts clicks on specific links. 

  1. Go to Theme Settings: In your Blogger Dashboard, go to Theme > click the arrow next to "Customize" > Edit HTML.
  2. Insert the Mapping Script: Find the </body> tag (usually at the very bottom) and paste the following script right above it:
<script type='text/javascript'>
// YOUR CUSTOM MAPPING TABLE
const urlMap = {
  "https://old-google-link-1.com": "https://new-functional-link.com",
  "https://old-google-link-2.com": "https://new-storage-service.com",
  "https://broken-link-3.com": "https://fixed-link-3.com"
};

document.addEventListener('click', function(e) {
  let element = e.target.closest('a');
  if (element && urlMap[element.href]) {
    e.preventDefault(); // Stop the browser from going to the dead link
    window.location.href = urlMap[element.href]; // Redirect to your functional link
  }
}, true);
</script>

Use code with caution.

Image generated by Grok.
 Why This Works

  • Centralized Control: You only have to update this single script in your theme to fix every instance of a broken link across all your hundreds of posts.
  • No "URL Shortener" Needed: The script runs in the user's browser. It checks the link at the exact moment they click it; if it's on your "broken list," it instantly swaps the destination for the functional one.
  • Mass Replacement: You can even use more advanced scripts to automatically scan your page and replace all matching URLs in the HTML as soon as the page loads, so the user never even sees the dead link in their status bar. 

Limitations to Consider

  • Maintenance: You still have to manually populate the urlMap table with your known dead/new links.
  • SEO: While this fixes the experience for human readers, search engine crawlers often don't execute JavaScript. To search engines, the links will still appear broken unless you use the Blogger XML export method to permanently replace them in the post content. 

Me: This is an old URL that used to allow people to access my Photo Album {https://photos.google.com/b/107059216299718970166/share/AF1QipNjb8t3gofnVKgIzGfgyC5LtXC-z0gveQrrFf55ScOFUiSgyFIkSXtK8ajDwjd4ig?key=cEFYMzRpVnhRZEZNa2J5WnZOT2x1RzdOWklLRWRR} And this is the new URL format {https://photos.app.goo.gl/Tkja717BmFLLyrEm6}

Image generated by Grok.
 Google AI: Because Google changed its underlying photo sharing infrastructure, your old URL (the "legacy" format) and the new URL (the "shortened" format) have no mathematical relationship. You cannot "convert" one into the other using code because the new URL is a randomized alias generated by Google's servers. 

However, you can use the JavaScript Mapping Table method to fix these links across your blog instantly.

The Solution: Instant Redirect Script

You can add this script to your Blogger theme. It will watch for clicks on any of your old, dead Google Photos links and silently redirect the user to the correct new album.

  1. In Blogger, go to Theme > click the arrow next to "Customize" > Edit HTML.

  2. Scroll to the very bottom and paste this right before the </body> tag:

<script type='text/javascript'>
// YOUR REDIRECT TABLE
const photoRedirects = {
  // Copy exactly the old URL inside the quotes, then the new one
  "https://photos.google.com/b/107059216299718970166/share/AF1QipNjb8t3gofnVKgIzGfgyC5LtXC-z0gveQrrFf55ScOFUiSgyFIkSXtK8ajDwjd4ig?key=cEFYMzRpVnhRZEZNa2J5WnZOT2x1RzdOWklLRWRR": 
  "https://photos.app.goo.gl/Tkja717BmFLLyrEm6",
  
  // Add more pairs here as you find them, separated by commas
  "OLD_URL_2": "NEW_URL_2"
};

document.addEventListener('click', function(e) {
  let link = e.target.closest('a');
  if (link && photoRedirects[link.href]) {
    e.preventDefault(); // Stop the dead link from loading
    window.location.href = photoRedirects[link.href]; // Go to the new one
  }
}, true);
</script>

 

Image generated by Grok.
Use code with caution.

Why this is your best option:

  • Zero Link Rot: Even though the link in your post is "dead," it will work perfectly for your readers because the script swaps it out at the moment of the click.

  • Centralized: If Google changes the format again in five years, you only have to update this one table in your theme settings, rather than editing hundreds of individual blog posts.

  • Legacy Issues: Google has historically deprecated various link formats (like the b/ prefix you see in your old URL), and they have recently announced that even some "goo.gl" short links may stop working unless they are "actively used". This script protects you from future changes. 

Do you have a list of these old and new URL pairs ready, or would you like a tool to help you crawl your blog and find all the dead ones at once?


Me: I don't see </body> near the end of bu Blogger blog's Theme file. These are the last 5 lines of code in the file: <b:include name='quickedit'/> </b:includable> </b:widget> </b:section-contents><b:section-contents id='footer-1'/><b:section-contents id='footer-2-1'/><b:section-contents id='footer-2-2'/></html>

Image generated by Grok.
 Google AI: The </body> tag is missing because Blogger's modern XML themes often use compressed or "folded" code. To find the correct spot for your redirect table, do not scroll manually; use the editor's built-in search tool. 

1. Locate the Hidden Tag

  1. In the Blogger HTML Editor, click anywhere inside the code area.

  2. Press Ctrl + F (or Cmd + F on Mac) to open the editor's internal search bar (do not use your browser's search).

  3. Type <body (without the closing bracket) and hit Enter.

  4. If it still looks like your snippet, click the black arrow next to the line numbers to "expand" the code. The </body> tag is often hidden within these collapsed sections near the end. 

2. If the Tag is Truly Missing

Image generated by Grok.
 If you cannot find </body>, you can place the script directly before the </html> tag you see on your last line. However, the most "Blogger-friendly" way to add this without breaking your theme's XML structure is to use the Layout tab instead. 

  1. Go to Layout in the left menu.

  2. Scroll to the very bottom and click Add a Gadget in the "Footer" or "Sidebar" section.

  3. Select HTML/JavaScript.

  4. Leave the Title blank and paste your script into the Content box: 

<script type='text/javascript'>
const photoRedirects = {
  "https://photos.google.com": 
  "https://photos.app.goo.gl"
};

document.addEventListener('click', function(e) {
  let link = e.target.closest('a');
  if (link && photoRedirects[link.href]) {
    e.preventDefault();
    window.location.href = photoRedirects[link.href];
  }
}, true);
</script>

Use code with caution.

  1. Click Save and then click the Save icon (floppy disk) at the bottom right of the Layout page. 

Image generated by Grok.
 This method is safer than editing the theme XML directly and ensures the script runs on every page of your blog.

Would you like me to show you how to expand the script so it also automatically updates the "src" of images that might be broken, or just the clickable links?


Me: line 1911 has the </body> tag. Lines 1900 to 1911 are: <div class='cap-left'/> <div class='cap-right'/> </div> </div> </div> <script type='text/javascript'> window.setTimeout(function() { document.body.className = document.body.className.replace(&#39;loading&#39;, &#39;&#39;); }, 10); </script> </body>

Google AI: Perfect. Since you already have a

<script> block there, you can tuck your mapping table right inside it. This keeps your code clean and ensures it runs as the page finishes loading.

Updated Implementation

Replace lines 1906 to 1910 with the following code. I’ve merged your redirect logic with the existing "loading" class removal script:

Image generated by Grok.
html

  <script type='text/javascript'>
    window.setTimeout(function() {
        document.body.className = document.body.className.replace('loading', '');
      }, 10);

    // YOUR URL REDIRECT TABLE
    const photoRedirects = {
      "https://photos.google.com": 
      "https://photos.app.goo.gl"
    };

    document.addEventListener('click', function(e) {
      let link = e.target.closest('a');
      if (link && photoRedirects[link.href]) {
        e.preventDefault();
        window.location.href = photoRedirects[link.href];
      }
    }, true);
  </script>

Use code with caution.

A Pro-Tip for Maintenance

As you find more dead links, just add a comma after the last URL pair and add the new one.

  • Format: "OLD_URL": "NEW_URL",

  • Case Sensitivity: Make sure the "OLD_URL" exactly matches what appears in your browser's address bar (or the status bar) when you hover over the broken link on your blog.

Why this is better than the XML export method:

Image generated by Grok.
 If you use the Blogger XML Export to do a "Find and Replace," you are permanently changing your content. If you make a mistake, it's hard to undo. With this Javascript Table, if you ever want to change a link back or fix a typo, you just edit this one section of your theme.

Do you have a batch of other URLs you need to add to this list right now, or should we verify if this first one works on your live site?

Me: I got this message:

org.xml.sax.SAXParseException; lineNumber: 1919; columnNumber: 17; The entity name must immediately follow the '&' in the entity reference.

Google AI: The error

org.xml.sax.SAXParseException occurs because Blogger treats your theme file as an XML document. In XML, the ampersand (&) is a reserved character that starts an "entity". Because your old Google Photos URL contains ?key=..., the XML parser is looking for an entity name like &amp; but finds the "k" in "key" instead. 

To fix this, you must wrap your JavaScript code in a CDATA section. This tells Blogger's parser to ignore everything inside that block and treat it as raw text, rather than XML code. 

The Fixed Code

Image generated by Grok.
 Replace the entire script section (from lines 1906 to 1910) with this version:

  <script type='text/javascript'>
  //<![CDATA[
    window.setTimeout(function() {
        document.body.className = document.body.className.replace('loading', '');
      }, 10);

    // YOUR URL REDIRECT TABLE
    const photoRedirects = {
      "https://photos.google.com": 
      "https://photos.app.goo.gl"
    };

    document.addEventListener('click', function(e) {
      let link = e.target.closest('a');
      if (link && photoRedirects[link.href]) {
        e.preventDefault();
        window.location.href = photoRedirects[link.href];
      }
    }, true);
  //]]>
  </script>

Use code with caution.

Why this works:

  • //<![CDATA[: This marks the start of the "Character Data" section.

  • //]]>: This marks the end of the section.

  • The // (JavaScript comments) prevent the browser from trying to execute the CDATA tags as actual code, while the XML parser uses them to safely skip over your ampersands. 

Image generated by Grok.
 Once you save this, the error should disappear and your redirect will be live. 

Would you like me to add a line to this script that automatically highlights these "remapped" links in a different color so you can easily spot them on your blog?

Me: That worked. Thank you.

Google AI: Sweet success! I'm glad that worked. Dealing with

XML parsers is always a bit of a headache when you just want to paste a URL.

Now that the system is live, you can keep adding to that photoRedirects list as you find more broken links. Just remember to add a comma after each closing quote (except the very last one) to keep the JavaScript happy.

Image generated by Grok.
 If you ever run into a situation where you have hundreds of links following a predictable pattern (e.g., if Google just changed one part of the URL string but kept the unique ID the same), we can actually upgrade that script with a Regular Expression (Regex) to fix them all automatically without you having to list them one by one.

Would you like to see how to verify which of your blog posts still contain these old dead links so you can add them to your table?

___

I saved my original Blogger Theme file for wikifiction.com.

The following new code...

  <script type='text/javascript'>
  //<![CDATA[
    window.setTimeout(function() {
        document.body.className = document.body.className.replace('loading', '');
      }, 10);

    // YOUR URL REDIRECT TABLE
    const photoRedirects = {

"https://photos.google.com/b/107059216299718970166/share/AF1QipNjb8t3gofnVKgIzGfgyC5LtXC-z0gveQrrFf55ScOFUiSgyFIkSXtK8ajDwjd4ig?key=cEFYMzRpVnhRZEZNa2J5WnZOT2x1RzdOWklLRWRR":

"https://photos.app.goo.gl/Tkja717BmFLLyrEm6", "https://photos.google.com/b/107059216299718970166/share/AF1QipN6bOFeiYsOYoRt0tU9oW_0hs_QMDAaOQpDn2fwrxu-0wpqb6ToY7m3ep_2peNwCQ?key=Q3BpazRrWmZ1aXpxNVF4NzlOX3M3NFk3ZVIzMnln": "https://photos.app.goo.gl/3sBFuqxXyZkyEktN9"

};
document.addEventListener('click', function(e) { let link = e.target.closest('a'); if (link && photoRedirects[link.href]) { e.preventDefault(); window.location.href = photoRedirects[link.href]; } }, true); //]]> </script>

replaced the following original code in my Theme file:

<script type='text/javascript'>

window.setTimeout(function() {

document.body.className = document.body.className.replace(&#39;loading&#39;, &#39;&#39;);

}, 10);

</script>

Next: plans for Chapter 8 of "The Sims". 

Images generated by Grok. Visit the Gallery of Movies, Book and Magazine Covers

No comments:

Post a Comment