If you currently have /path/to/site.html
and change it to /path/to/site
, this will affect SEO, as search engines think they know the url (the former).
However, there are solutions to this. You can either keep the .html
at the end of the URL (there should be no problem to use a WordPress permalink with .html in the end), or if you want to clean up your URLs, you need to redirect from one to the other (use 301 redirects).
There is extensive material on how redirects work (like this), if you only want the .html to disappear (and rest of the URL stays the same), something like this could already work in an .htaccess
RewriteRule ^(*.)\.html$ $1 [R=301,QSA,L]
Otherwise, you’d need a more complex structure which depends on your specific current situation.
Related Posts:
- Disable Attachment Pages Completely
- How is WordPress manipulating the posts like there are folders?
- 200 Rewrite blog post links
- wp_trim_words() does not work with my code Am I doing any mistake in my code?
- how to edit a specific post slug using a php code?
- understand what code is doing when prepending /blog
- Custom URL for multiple categories hierarchy
- 404 on old link after changing post url
- How do I generate formatted permalinks as specified in backend options?
- how to get permalink structure with php
- Current post’s author name in the author meta tag
- Handling error states with admin_post
- Insert code when users come from an specific referer
- How to display related posts from parent category
- Make custom field meta not display if there is not data in it
- Put a link to a category round a hard coded A HREF
- How to migrate the posts from an old custom legacy blog to a new WordPress website?
- Get_the_author doesn’t return author name
- wordpress upgrade has broken my permalinks
- How can I use wp_query to show all product data using just the products ID?
- Trying to add attribute to my posts’ featured image
- Add prefix to link url
- Loop through categories and display posts title under each dropdown
- How to remove role=”navigation” from all nav elements?
- php script to change slug in post automatically
- Changes in permalink structure in WordPress and how to apply to in-site links
- How to use $_GET function WordPress backend
- How to store post ID’s in cookie or session to display the same posts later
- Post + form + action + results on the same page
- Post repeating with infinite scroll
- Display related posts without a plugin
- Count posts on multisite with blog id
- Making (and edit existing) posts with ID included
- Parsing Menu Items and Blog Posts
- How to show an entire post content and not also the excerpt?
- Change product_base programmatically
- WordPress query undefined offset in loop
- Divi change project category slug
- WP_Query: getting posts where custom field exists
- Increment paged on WP_Query
- Custom post type permalinks do not appear using the link functions
- How to Handle Going Backwards in Navigation When Referrer in PHP/JavaScript won’t work?
- get post id from wp_insert_post for get_template_part
- Remove slugs from custom posts type
- Get the id of all images in a post
- Four posts per row [closed]
- Update if post with specific title exists
- Need help removing […] after excerpt
- Genesis / custom template page / setting the page title and meta desc
- Create a slug for a page in WordPress
- Permalinks: site.com/post-tite vs site.com/post-id/post-title for SEO and Speed
- Pagination in single.php
- Change permalink structure specific category
- Advanced Query posts
- WordPress redirects to localhost
- My Custom Post Type AJAX Query is Returning no posts – why?
- url not using query string no longer working
- How to get post image caption by index
- Inside Array – “unidentified index” error with “prepare was called incorrectly” despite not calling the prepared statement with wordpress [closed]
- Is there anyway I can call the year once?
- Check $post->ID against multiple values
- Don’t update modified post date when user add a product review or comment?
- Limit the number of characters/words in an excerpt for a related posts section
- Yoast Breadcrumbs Inject Multiple Levels
- Posts missing on author page
- How to allow users to save list of posts in wordpress?
- Permalink doesn’t navigate to post (changes only url)
- How to edit button permalink inside function.php using a child theme?
- Closing Comments conditionally in comments.php
- How to center all text body in single.php at once?
- Having trouble with customizing blog posts on the home page
- How do I stop my form from adding code to current page URL instead of re-directing. Been stuck for days
- Related Posts: if there is no category use tags
- image on homepage disappeared due to change of permalink name
- How do if all posts has this category ID then do this
- Get current_post in reverse order with pagination
- Getting error in sql query
- 403 Forbidden Localhost Wamp Apache Php
- How do I get the featured post to share on Social Media and show on Individual Post pages?
- Insert div after every three posts in home.php [duplicate]
- PHP tag in post content makes wordpress go crazy
- Unable to get Post Category Name and URL
- Dynamically Create Posts Via XML File
- Permalinks and custom PHP application
- Basic PHP question (displaying post title over thumbnail) [closed]
- Some links broken after updating WordPress version
- insert thumbnail image from php script
- Post from front end form to post_meta
- media_handle_sideload() returned post_id being incremented
- Saving Post redirects to 404 page when php $_GET variable in post body
- Would it be possible to route WordPress Through an MVC Application
- How can I add WordPress Audio Player as featured audio in Audio Blog Posts?
- Trying to see if page is category or single and displaying title with appropriate heading tag
- Magento and WordPress URL integration [closed]
- PHP code for link with text
- How to customize posts in WordPress by using HTML and CSS?
- How to create a WordPress PAGE in another folder?
- seo meta description issue in google search
- Need Help With Making Full-Width Template for Blog Posts (common methods aren’t working)
- How to modify default tags in wp_head()