I visit a website frequently and it's domain has changed (from foo.com to foo-bar.com). My history is full of the old-domain entries, which is very annoying, because I get a lot of 404s. I wonder if it's possible to bulk edit urls in Google Chrome history?
Asked
Active
Viewed 2,206 times
3
fodma1
- 133
-
Aside from what sounds like a botched website deployment (any web dev worth their salt would have put redirects in place to prevent the 404s), do you want to edit the URLs or just remove the old URLs? – Burgi Mar 02 '16 at 10:33
-
It's intentional, that the domain has changed, and it does not redirect. I'd better keep the urls. - Removing them is not that hard with some hotkey afaik – fodma1 Mar 02 '16 at 11:21
1 Answers
5
Chrome stores it's local history in an SQLite file called History.
On Windows you can find this file here:
C:\Users\YOURUSERHERE\AppData\Local\Google\Chrome\User Data\Default
The OSX location of this file is (as per @fodma1's comment):
~/Library/Application Support/Google/Chrome/Default/
I grabbed the free SQLite browser from DB Browser for SQLite and opened the history file. In there is a table called urls, opening this lists all the historic URLs.
You can then edit each line manually one by one or run a small SQL script to change multiple entries.
This SQL script will work for you:
UPDATE urls
SET url = REPLACE(url,".foo.",".foo-bar.")
WHERE url LIKE "%foo%";
Burgi
- 6,551
-
1Thank you, it's under
sqlite3 ~/Library/Application\ Support/Google/Chrome/Default/Historyon OS X – fodma1 Mar 02 '16 at 15:52 -
2The location appears to have changed for me on OSX. This may be a better reference for the location: https://stackoverflow.com/q/8936878/245915. – nofinator Feb 13 '19 at 14:48
