Hi @lonozx
When a question mark is used in a URL, it has a very specific function: it marks the end of the URL itself and after the question mark there will be one or several named arguments. (They’re usually called query variables.)
If you search on Google, for instance, the search URL is just https://www.google.com/search but whatever you’re searching for gets added as a query variable: https://www.google.com/search?q=interesting+story. And Google will usually add a bunch of additional data in the form of more pairs of &name=value&name2=value2
Actually, the default behavior of WordPress is to have all traffic hit the main page, and then use query variables to indicate what content is needed. (As you may know, the actual content in WordPress is located in a database, and even if you hide the fact that virtually all requests are sent to the “main URL”, this will still be happening “under the hood”.
Your first action would be to visit Settings/Permalinks and select a different permalink structure. If you still see strange URL’s, then you may need to figure out what kind of data gets added to the URL, it could be session identifiers or something else.
Thread Starter
lonozx
(@lonozx)
Thank you for answer.
Actually I checked the permalinks settings before and if I choose postname as I wanted it to be, then all pages go 404 status. But recently everything was OK. Now only plain setup is made pages open 🙁
You could check with your web host if they’ve changed your server configuration in any way. For instance the .htaccess file only works with Apache servers.
Oh, and you could check if there is a .htaccess in your main directory and if it seems to be correctly configured. If your server is Apache and you have no .htaccess file, then WordPress will try to create one when you go to the permalink settings. So you could try renaming the one you’ve got and then update your permalink settings.
@lonozx Regarding your issue, if you are changing the permalink structure of your site to a structure of /%postname%/, the permalink helper tool we offer can generate a redirect that will handle all of the redirects necessary due to the permalink structure change.
The permalink helper tool can be found at the following link: https://yoast.com/research/permalink-helper.php.
We also have more information on using this tool and changing the permalink structure in the following article: Why you should change your WordPress permalink structure. We also have an article on the best practices for creating an optimized permalink structure here: The perfect WordPress SEO permalink structure.