by lilouartz on 6/11/24, 2:18 AM with 102 comments
by lm411 on 6/14/24, 3:46 AM
The "implications for SEO" will almost certainly not be "positive" for quite a few reasons. As a general rule in my experience and learning, Google's black box algorithm doesn't like anything like this, and I expect you will be penalized for it.
There are many good comments already and my suggestions would merely be repeating them, so, just adding my voice that this is likely to be a bad idea. Far, far, better to simply have a useful 404 page.
Edit just to add: if you do something like this, make sure you have a valid sitemap and are using canonical tags.
by chrismorgan on 6/13/24, 6:54 PM
So no, please don’t ever do this.
But what you can do is provide a useful 404 page. Say “there’s no page at this URL, but maybe you meant _____?” Although there’s a strong custom of 404 pages being useless static fluff, you are actually allowed to make useful 404 pages. Just leave it as a 404, not a 3xx.
(Also, care about your URLs and make sure that any URL that ever worked continues to work, if the content or an analogue still exists at all. Distressingly few people even attempt this seriously, when making major changes to a site.)
by conductr on 6/13/24, 6:29 PM
I might be wrong but for me it’s because IRL this isn’t an issue. Users shouldn’t be finding/using random URLs to navigate the site. Where is this broken URL traffic coming from anyway? Are you trying to solve for people that randomly edit the URL and expect it work, most people don’t care about those users getting 404 because they should expect 404. They’re not real users they’re just playing around.
However, If you purposely changed the URL format after a lot of people have the old format bookmarked or indexed on the web, then do a 301 redirect to the new URL.
I’m not sure of the SEO implications of the described solution, however it seems like only risk and no upside.
by lilouartz on 6/14/24, 1:38 AM
Whether it is positive or negative, I do appreciate it as it helps me to learn and improve the product. I really didn't expect this to get any attention, let alone dozens of comments!
To clarify: This was originally designed to help me auto migrate URL schema. I am learning as I develop this website, and SEO has been one of those vague topics where there are few hard rules. I wanted to leave space for experimentation. As I rolled it out, I became intrigued with how it functions and wanted to share my experiment with you to get feedback.
Based on the feedback, I plan to change the logic such that:
- I will track which URLs are associated with which products - If user hits 404, I will check if there was previously a product associated with that URL and redirect accordingly - If it is a new 404, I will display a 404 page which lists products with similar names
I appreciate everyone hopping in to share their perspective!
by bad_username on 6/13/24, 6:39 PM
Maybe because it is not a good idea. Masking errors is harmful. The information "what you're looking for is not there" is very important, because it lets users identify that something is wrong. Smart redirection can be outright dangerous: what if I am buying a medication, and the smart website silently replaces the correct drug with something similar but wrong? Not to mention the pollution of the indexes of search engines with all the permutations of the same thing they may discover. Lastly, the U in URL stands for unique; the web is designed around unique locators and this rule shouldn't be broken without a very good reason.
Show the user (and the crawlers) a 404, and suggest your corrected URL in the content of.the 404, and let the user know that it's a guess, so they make an informed choice about the situation.
by pimlottc on 6/13/24, 7:39 PM
- https://pillser.com/supplements/trump-won-the-election
- https://pillser.com/supplements/hitler-did-nothing-wrong
- https://pillser.com/supplements/9-11-was-an-inside-job
etc etc etc
by jamies888888 on 6/14/24, 3:57 PM
Someone could seriously mess up your site by simply publishing their own page with many invalid links to your site, basically a dictionary attack, and if Google was to crawl those links, they'll cache all the redirects, and you'll have a hard time rectifying that if you were wanting to then publish pages on those URLs.
Also to reiterate other suggestions - your idea is not great for many reasons already stated (even with 302s). As suggested, just simply have a 404 page with a "Did you mean [x]?" instead. Use your same logic to present [x] in that example, rather than redirect to it.
by david422 on 6/13/24, 6:37 PM
by Levitating on 6/14/24, 8:32 AM
I don't see the problem that this is a solution for but I can see a couple of problems that this solution causes.
by cantSpellSober on 6/13/24, 7:46 PM
https://pillser.com/supplements/merotonin
I am surprised that more websites do not implement this!
by brianpan on 6/13/24, 6:48 PM
Vendors change product names, hyperlinks break! Fix bugs or change behavior, hyperlinks break! Do nothing, believe it or not, hyperlinks break!
by bena on 6/13/24, 7:27 PM
I do think that it's ok for several URLs to point to the same content. In his example all three are fine. I also tried the product code (6066) without any of the text and it worked fine as well.
I've also noticed Lego's site does a version of this as well. https://www.lego.com/en-us/product/10334 will take you to the product page for the Retro Radio. However, I think Lego's site is just keying in on the product id as "retro-radio" doesn't work, but "ret-rad-10334" does.
But there are limits.
I put in the URL "https://pillser.com/supplements/go-fuck-yourself" to see what would happen. Now, I chose an offensive phrase to increase my chances of not coming close to any real product. I believe that URL should 404, but it took me to the page for the supplement "On Your Game" instead. If I had tried a real name and got taken to something with only the barest resemblance to the name I tried, I wouldn't be thinking "This must be the closest match". I'd think the site did something messed up or I typed something wrong or something malicious had happened.
by dewey on 6/13/24, 7:26 PM
> a product is renamed, or the logic used to generate the URL changes.
In that case you should store both urls and have a redirect_to_id or something similar to give search engines and users a proper 301. I don't see a use case for this fuzzy matching which will just make things not very explicit and unpredictable.
by yiiii on 6/14/24, 8:52 AM
by victorbjorklund on 6/13/24, 6:46 PM
by zamadatix on 6/13/24, 6:33 PM
by spaceywilly on 6/13/24, 6:50 PM
by bombcar on 6/13/24, 6:24 PM
It is good because it will help most people and work for them.
It's bad because sometimes it will make people think they've found what they were looking for when what they had doesn't exist at all - but it gave them something that sounds similar.
I would at least have a "redirected from" banner at the top of the page when it triggers.
by vizualbod on 6/15/24, 6:44 AM
by bestest on 6/14/24, 6:09 AM
For everything else you can just have a nice 404 with suggestions of links that probably are a match.
by dev2point0 on 6/14/24, 4:50 PM
by temporarely on 6/13/24, 7:15 PM
The web by definition is a lazily-materialized query response graph.
by everythingabili on 6/13/24, 6:56 PM
Still, it's a good idea.
You can further this idea (especially when the slug returns nothing) by having this page also list "Best Bets" or what people most often come to your site for (regardless of any search query, perhaps, with their referrer, or on this day of the week etc)
And additionally, put the slug (bar the dashes) into a search box so it might be ammended (but tell them that you didn't find anything and they need to try something else).
by hughesjj on 6/13/24, 6:39 PM
Not sure how to best do that in postgres though, closest I can find is reserved connections per user. Idk maybe there's an extension or it's easy to do it in the webserver
https://www.postgresql.org/docs/current/runtime-config-conne...
by evilc00kie on 6/14/24, 9:14 AM
Slightly OT but came into my mind when thinking about designing website related stuff: https://www.w3.org/Provider/Style/URI
by initramfs on 6/14/24, 6:27 AM
Here is a partially fixed issue https://hatonthecat.github.io/Hurl/404.html
by a_imho on 6/14/24, 10:25 AM
by potocnik on 6/14/24, 9:03 AM
by amadeuspagel on 6/14/24, 5:15 AM
by rmbyrro on 6/13/24, 7:51 PM
this is not going to end well...
by llmblockchain on 6/14/24, 3:21 PM
"Hey that page doesn't exist, but there are some similar pages..."
by tiffanyh on 6/14/24, 11:57 AM
https://pillser.com/engineering/2023-06-10-website-without-4...
by dsr_ on 6/13/24, 7:25 PM
by kragen on 6/14/24, 6:07 AM
by wavemode on 6/13/24, 7:03 PM
by riiii on 6/14/24, 11:21 AM
You show me the links you think I want, on the 404 page.
by jslakro on 6/14/24, 3:41 PM
by mike-the-brain on 6/13/24, 7:09 PM
clickable:
https://pillser.com/supplements/vitamin-1973-omg-i-can-type-...
by account42 on 6/14/24, 10:02 AM
by ceving on 6/14/24, 7:40 AM
by theanonymousone on 6/14/24, 9:17 AM
by 4ndrewl on 6/14/24, 6:19 AM
by btbuildem on 6/13/24, 7:49 PM