@benfoxall I've tweaked this now. Only problem is `order` doesn't allow array conditions, so I'm passing in the raw string. However, this has been parsed by Domainatrix, so if it's an invalid URL (like `Robert'); DROP TABLE Students;--`), the domain will be an empty string. I imagine ActiveRecord will also do some rudimentary filtering even if you pass a string in.