Is it permissible to invest in indices like the dow jones and S&P 500?
The Dow Jones Index consists of 30 stocks. Some of them like American Express (Interest based), Goldman Sachs (Portfolio may contain Non-Halal Investments), Coca Cola (Sells Lemon-Do which is an alcoholic beverage) are not necessarily Shariah-compliant.
Similar is the case with the S&P 500 index.
If you are a conservative investor, it is recommended to opt for a Halal Index instead. Alternately if you are not risk averse, you can always invest directly in a stock instead of an index. I'd recommend sticking to large cap blue chip stocks for long term investments and mid cap stocks with a 10%-20% stop loss for medium term investments.