• Resolved lonozx

    (@lonozx)


    Hi!
    I was on a finish line with all element on my site and want to remove “?” from several links using Yoast SEO plugin. But after I use a data optimization all my pages won`t load and shows 404 error. Only thing that helps I set permalinks setting to plain but now all links are /? type.
    What should I try to come back to what is was? Is this even possible

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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.

    Plugin Support devnihil

    (@devnihil)

    @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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Facing error 404 all pages except home and shop’ is closed to new replies.