The stock market has always been subject to volatility, but this year has been a particularly wild ride. After closing out one of its worst quarters in history earlier this year, the market made a remarkable recovery and experienced record highs just a few months later.

However, after experiencing a downturn over the last few weeks, there's a chance another crash could be looming. While nobody knows for sure whether a market crash is on the way or not, there are a few 401(k) moves that can help protect your savings.

Couple sitting on a couch looking at documents

Image source: Getty Images.

1. Try to contribute enough to earn the full employer match

One of the keys to building a robust retirement fund is to save as consistently as possible -- even during market downturns. Market crashes are actually fantastic opportunities to invest more, because you can get more bang for your buck when stock prices are lower.

Matching 401(k) contributions from your employer can help your money go further, so it's wise to take full advantage of them. After all, those matching contributions are essentially free money, and if you're not saving at least enough to earn the full match, you're leaving money on the table.

2. Don't invest any money you might need in the near future

While it's smart to invest as much as you can during a market downturn, it's also important to avoid investing more than you can realistically afford.

Your 401(k) isn't a savings account, so there are consequences to withdrawing your money before retirement age. In fact, if you withdraw your savings before age 59 1/2, you're generally subject to income taxes and a 10% penalty fee on the amount you withdraw. In addition, withdrawing your money during a market downturn can be especially harmful because you're selling your investments when stock prices are lower -- and locking in your losses.

For those reasons, it's a good idea to make sure you have at least three to six months' worth of savings in an emergency fund before you start throwing all your spare cash into the stock market. That way, if you're faced with an unexpected expense, you won't need to tap your retirement fund to pay for it.

3. Consider adjusting your asset allocation

Your asset allocation refers to how your investments are divided up within your portfolio. You likely have a mix of stocks and bonds, which affects how aggressive or conservative your portfolio is. A more aggressive investment approach involves allocating the majority of your portfolio toward stocks, while a conservative strategy would be to invest heavily in bonds.

If you're nearing retirement age, it's wise to invest more conservatively. A market crash could wipe out your savings if you're investing only in stocks, so allocating more of your portfolio toward bonds could help protect your savings.

Just how much you should invest in stocks versus bonds, however, depends on your age and risk tolerance. A good rule of thumb is to subtract your age from 110, and the result is the percentage of your portfolio that should be invested in stocks. So, for instance, if you're 50 years old, 60% of your portfolio should be allocated to stocks, and 40% should be invested in bonds. That said, you may choose to adjust these percentages depending on whether you're more risk-averse or risk-tolerant.

Will your savings survive a market crash?

It's uncertain whether a market crash is on the horizon, but it never hurts to be prepared just in case. By making these three investing moves now, you can ensure your 401(k) savings are as safe as possible.