Default Wordpress 301 Redirects of JS and CSS files. Bad for SEO & How to Fix?
-
Hi there:
We are developers with some digital marketing expertise, but a current issue has us perplexed. An outside SEO firm has asked us to clean up a large number of 301 redirects. Most of these are 'default' Wordpress behavior that relate to calling the latest version of a JS or CSS file. For instance, a JS file is called with this: https://websitexyz.com/wp-includes/js/wp-embed.min.js?ver=4.9.1 but ultimately redirects to this: https://websitexyz.com/wp-includes/js/wp-embed.min.js. We are being asked to prevent the redirect from happening by, presumably, calling the ultimate file to begin with.
The issue is that, as far as we know, there's no easy way to alter WP behavior to call the ultimate file to begin with. Does anyone have any thoughts on this?
Thanks.
-
Thanks Martijn, we'll look into the blog post and implement.
dave
-
Hey David,
Depending on if you're using a custom template or not, you might want to look into this blog posts which is talking about that you can basically register files & styles to be inserted but they don't always have to have the version number: http://wpcrux.com/blog/wordpress-enqueue-functions-version/ . I've dealt with this once before, although it's a super tiny issue that is usually something that I would put on my roadmaps ;).
Martijn.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Negative SEO & How long does it take for Google to disavow
Following on from a previous problem of 2 of our main pages completely dropping from index, we have discovered that 150+ spam, porn domains have been directed at our pages (sometime in the last 3-4 months, don't have an exact date). Does anyone have exerpeince on how long it may take Google to take noticed of a new disavow list? Any estimates would be very helpful in determining our next course of action.
Intermediate & Advanced SEO | | Vuly1 -
Remove Product & Category from URLS in Wordpress
Does anyone have experience removing /product/ and /product-category/, etc. from URLs in wordpress? I found this link from Wordpress which explains that this shouldn't be done, but I would like some opinions of those who have tried it please. https://docs.woocommerce.com/document/removing-product-product-category-or-shop-from-the-urls/
Intermediate & Advanced SEO | | moon-boots0 -
Domain forward or 301 redirect
My company recently acquired another company including their web presence. We are soon ending their website and will be either 301 redirecting their domain to our domain or pointing their domain to our nameservers. Their domain authority is only 25 while our domain authority is 32. Their domain was created in 1998 while ours was created in 1999. So to keep our domain authority up or enhance it, should we do a 301 redirect or a domain forward. And that is if there is any difference? Thanks Chris
Intermediate & Advanced SEO | | topsailislander0 -
Which automatic redirects to use in International SEO
Hi, I need help with international SEO redirects. I'm going to have intelligencebank.com/au for Australian visitors and intelligencebank.com for the rest of the world. I would like to automatically redirect aus users that land on .com to .com/au and vice versa for non-australian users. 1. Which automatic redirects should I use: a) java script because it will allow US based google bots to crawl my /au website (bots won't read javascript so they won't be redirected) b) http redirects c) 301 redirects d) 302 redirects e) anything else? a) Should I still use rel alternate even though I only use english? b) if I should add rel alternate, can I still keep my existing rel canonical tags that are use to avoid duplicate content (I use a lot of utm codes when advertising)
Intermediate & Advanced SEO | | intelligencebank0 -
Domain forward to landing page - good or bad for SEO?
Hi Mozzers, Just recently we acquired a domain (www.nhacaribbean.com) for marketing purposes. Our technical staff used a frame forward to redirect the domain to the landing page http://www.nha.nl/alles-over-nha/Caribbean.aspx, which is only linked in the sitemap (not in the navigational structure of the site). Now, I'd personally just redirect the domain with a 301. But our CEO really wanted to keep the domain www.nhacaribbean.com visible in the URL bar. My question is: could this (potentially) really hurt rankings for our web site one way or the other? I'd love to hear from you guys. Thanks in advance.
Intermediate & Advanced SEO | | NHA_DistanceLearning0 -
Redirects in .htaccess file
I am using yoast seo plugin for wordpress. I have done several link changes and placed approximately 80-100 301 redirect into .htaccsses file. Is this good practice? Do they have to be there forever? Is it not slowing down site? Or should this be done in different way? Thank you very much Iris
Intermediate & Advanced SEO | | Rebeca10 -
Premium Real Estate Wordpress Templates and SEO
Has anyone had any experience with premium real estate templates and SEO? Are their reviews in this regard? How does one get past the marketing and find out if they are SEO friendly?
Intermediate & Advanced SEO | | casper4340 -
Multiple 301 redirects considered a redirection chain?
I need to redirect a ton of duplicate content, so I want to try redirect 301 /store/index.php /store redirect 301 /store/product-old /store/product-new redirect 301 /store/product-old1 /store/product-new1 redirect 301 /store/product-old2 /store/product-new2 redirect 301 /store/product-old3 /store/product-new3 redirect 301 /store/product-old4/file.html /store/product-old4/new4/file.html and then a whole bunch of old dead links to homepage. So we've had /index.php redirected to / on other parts of the site for awhile, and for the most part /store is a friendly URL, but then we have tons of dup content and work arounds that preceded my job here. I'm wondering if those redirects above would be considered a redirection chain? Since the all the redirects below the /index.php -> /store count on that one redirect. Thanks for any insight you may be able to give!
Intermediate & Advanced SEO | | Hondaspeder1